]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Also work on systems that have `struct direct', using autoconf's AC_HEADER_DIRENT.
authorJim Meyering <jim@meyering.net>
Sun, 12 Jan 2003 18:03:48 +0000 (18:03 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 12 Jan 2003 18:03:48 +0000 (18:03 +0000)
lib/ftw.c

index a3679db7f66109d09dd507bf4a60b83f85de3589..b0236e7323de810b8baf55b9a48f80c31ff25315 100644 (file)
--- a/lib/ftw.c
+++ b/lib/ftw.c
 # include <config.h>
 #endif
 
-#include <dirent.h>
+#if HAVE_DIRENT_H || defined _LIBC
+# include <dirent.h>
+#else
+# define dirent direct
+# if HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
+
 #include <errno.h>
 #include <ftw.h>
 #include <search.h>