readdir has been part of Posix since the very beginning. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- configure.ac | 1 - include/builddefs.in | 1 - io/Makefile | 7 +------ io/io.h | 7 ------- m4/package_libcdev.m4 | 17 ----------------- 5 files changed, 1 insertion(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac index 5f1478f68..68d50e2d2 100644 --- a/configure.ac +++ b/configure.ac @@ -168,7 +168,6 @@ AC_HAVE_PREADV AC_HAVE_COPY_FILE_RANGE AC_HAVE_SYNCFS AC_HAVE_FLS -AC_HAVE_READDIR AC_HAVE_FSETXATTR AC_HAVE_MREMAP AC_NEED_INTERNAL_FSXATTR diff --git a/include/builddefs.in b/include/builddefs.in index 247dd9956..4951ae9d9 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -95,7 +95,6 @@ HAVE_PREADV = @have_preadv@ HAVE_PWRITEV2 = @have_pwritev2@ HAVE_COPY_FILE_RANGE = @have_copy_file_range@ HAVE_SYNCFS = @have_syncfs@ -HAVE_READDIR = @have_readdir@ HAVE_FLS = @have_fls@ HAVE_FSETXATTR = @have_fsetxattr@ HAVE_MREMAP = @have_mremap@ diff --git a/io/Makefile b/io/Makefile index 0709f8f21..837716238 100644 --- a/io/Makefile +++ b/io/Makefile @@ -14,7 +14,7 @@ CFILES = init.c \ link.c mmap.c open.c parent.c pread.c prealloc.c pwrite.c reflink.c \ resblks.c scrub.c seek.c shutdown.c stat.c swapext.c sync.c \ truncate.c utimes.c fadvise.c sendfile.c madvise.c mincore.c fiemap.c \ - sync_file_range.c + sync_file_range.c readdir.c LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUUID) LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) @@ -46,11 +46,6 @@ ifeq ($(HAVE_PWRITEV2),yes) LCFLAGS += -DHAVE_PWRITEV2 endif -ifeq ($(HAVE_READDIR),yes) -CFILES += readdir.c -LCFLAGS += -DHAVE_READDIR -endif - ifeq ($(HAVE_MREMAP),yes) LCFLAGS += -DHAVE_MREMAP endif diff --git a/io/io.h b/io/io.h index ad025c51d..e807bb0de 100644 --- a/io/io.h +++ b/io/io.h @@ -129,15 +129,8 @@ extern void copy_range_init(void); #endif extern void sync_range_init(void); - -#ifdef HAVE_READDIR extern void readdir_init(void); -#else -#define readdir_init() do { } while (0) -#endif - extern void reflink_init(void); - extern void cowextsize_init(void); #ifdef HAVE_GETFSMAP diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index 5a2290de1..25d869841 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -91,23 +91,6 @@ syncfs(0); AC_SUBST(have_syncfs) ]) -# -# Check if we have a readdir libc call -# -AC_DEFUN([AC_HAVE_READDIR], - [ AC_MSG_CHECKING([for readdir]) - AC_LINK_IFELSE( - [ AC_LANG_PROGRAM([[ -#include <dirent.h> - ]], [[ -readdir(0); - ]]) - ], have_readdir=yes - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) - AC_SUBST(have_readdir) - ]) - # # Check if we have a flc call (Mac OS X) # -- 2.39.2