From 8cb7308f3a24249ed091c7decf22005c64099783 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 17 May 2020 20:02:07 -0400 Subject: lib9: use opendir/readdir to read directories getdirentries(2) has been deprecated on macOS since 10.5 (ten releases ago). Using it requires disabling 64-bit inodes, but that in turn makes binaries incompatible with some dynamic libraries, most notably ASAN. At some point getdirentries(2) will actually be removed. For both these reasons, switch to opendir/readdir. A little clunky since we have to keep the DIR* hidden away to preserve the int fd interfaces, but it lets us remove a bunch of OS-specific code too. --- include/u.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/u.h b/include/u.h index 10fc7257..297df70a 100644 --- a/include/u.h +++ b/include/u.h @@ -39,9 +39,6 @@ extern "C" { # define _ALL_SOURCE # undef HAS_SYS_TERMIOS #endif -#if defined(__APPLE__) -# define _DARWIN_NO_64_BIT_INODE /* Snow Leopard */ -#endif #define _LARGEFILE64_SOURCE 1 #define _FILE_OFFSET_BITS 64 -- cgit v1.2.3