diff options
author | Christoph Hellwig <hch@lst.de> | 2024-02-15 07:54:05 +0100 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2024-03-13 08:48:37 +0100 |
commit | dbe764ee7fcf21aa17a1210f66e0aa1685229f68 (patch) | |
tree | c5b65a07c5799ea10c781a43600134835a01cd0d | |
parent | f367d5629bfaf36231486bdff9eda2e5698416a4 (diff) | |
download | xfsprogs-dev-dbe764ee7fcf21aa17a1210f66e0aa1685229f68.tar.gz |
configure: don't check for getmntent
getmntent always exists on Linux (and always has), so don't bother
checking for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | fsr/Makefile | 4 | ||||
-rw-r--r-- | include/builddefs.in | 2 | ||||
-rw-r--r-- | libfrog/Makefile | 4 | ||||
-rw-r--r-- | libfrog/paths.c | 9 | ||||
-rw-r--r-- | m4/package_libcdev.m4 | 27 |
6 files changed, 1 insertions, 47 deletions
diff --git a/configure.ac b/configure.ac index 127bd90efb..228e89a504 100644 --- a/configure.ac +++ b/configure.ac @@ -171,7 +171,6 @@ AC_HAVE_FADVISE AC_HAVE_MADVISE AC_HAVE_MINCORE AC_HAVE_SENDFILE -AC_HAVE_GETMNTENT AC_HAVE_FALLOCATE AC_HAVE_FIEMAP AC_HAVE_PWRITEV2 @@ -179,7 +178,6 @@ AC_HAVE_PREADV AC_HAVE_COPY_FILE_RANGE AC_HAVE_SYNC_FILE_RANGE AC_HAVE_SYNCFS -AC_HAVE_MNTENT AC_HAVE_FLS AC_HAVE_READDIR AC_HAVE_FSETXATTR diff --git a/fsr/Makefile b/fsr/Makefile index 86486fc9c5..d57f2de24c 100644 --- a/fsr/Makefile +++ b/fsr/Makefile @@ -11,10 +11,6 @@ LLDLIBS = $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBBLKID) LTDEPENDENCIES = $(LIBHANDLE) $(LIBFROG) LLDFLAGS = -static-libtool-libs -ifeq ($(HAVE_GETMNTENT),yes) -LCFLAGS += -DHAVE_GETMNTENT -endif - default: depend $(LTCOMMAND) include $(BUILDRULES) diff --git a/include/builddefs.in b/include/builddefs.in index b00d63e8e9..ff2a781494 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -95,7 +95,6 @@ HAVE_FADVISE = @have_fadvise@ HAVE_MADVISE = @have_madvise@ HAVE_MINCORE = @have_mincore@ HAVE_SENDFILE = @have_sendfile@ -HAVE_GETMNTENT = @have_getmntent@ HAVE_FALLOCATE = @have_fallocate@ HAVE_FIEMAP = @have_fiemap@ HAVE_PREADV = @have_preadv@ @@ -104,7 +103,6 @@ HAVE_COPY_FILE_RANGE = @have_copy_file_range@ HAVE_SYNC_FILE_RANGE = @have_sync_file_range@ HAVE_SYNCFS = @have_syncfs@ HAVE_READDIR = @have_readdir@ -HAVE_MNTENT = @have_mntent@ HAVE_FLS = @have_fls@ HAVE_FSETXATTR = @have_fsetxattr@ HAVE_MREMAP = @have_mremap@ diff --git a/libfrog/Makefile b/libfrog/Makefile index dcfd1fb8a9..cafee073fe 100644 --- a/libfrog/Makefile +++ b/libfrog/Makefile @@ -54,10 +54,6 @@ workqueue.h LSRCFILES += gen_crc32table.c -ifeq ($(HAVE_GETMNTENT),yes) -LCFLAGS += -DHAVE_GETMNTENT -endif - LDIRT = gen_crc32table crc32table.h default: ltdepend $(LTLIBRARY) diff --git a/libfrog/paths.c b/libfrog/paths.c index d8c42163a7..320b26dbf2 100644 --- a/libfrog/paths.c +++ b/libfrog/paths.c @@ -15,6 +15,7 @@ #include "paths.h" #include "input.h" #include "projects.h" +#include <mntent.h> #include <limits.h> extern char *progname; @@ -295,10 +296,6 @@ fs_cursor_next_entry( return NULL; } - -#if defined(HAVE_GETMNTENT) -#include <mntent.h> - /* * Determines whether the "logdev" or "rtdev" mount options are * present for the given mount point. If so, the value for each (a @@ -417,10 +414,6 @@ fs_table_initialise_mounts( return error; } -#else -# error "How do I extract info about mounted filesystems on this platform?" -#endif - /* * Given a directory, match it up to a filesystem mount point. */ diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index 174070651e..5d947a0243 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -71,24 +71,6 @@ sendfile(0, 0, 0, 0); ]) # -# Check if we have a getmntent libc call (Linux) -# -AC_DEFUN([AC_HAVE_GETMNTENT], - [ AC_MSG_CHECKING([for getmntent ]) - AC_COMPILE_IFELSE( - [ AC_LANG_PROGRAM([[ -#include <stdio.h> -#include <mntent.h> - ]], [[ -getmntent(0); - ]]) - ], have_getmntent=yes - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) - AC_SUBST(have_getmntent) - ]) - -# # Check if we have a fallocate libc call (Linux) # AC_DEFUN([AC_HAVE_FALLOCATE], @@ -263,15 +245,6 @@ AC_DEFUN([AC_HAVE_FSETXATTR], ]) # -# Check if there is mntent.h -# -AC_DEFUN([AC_HAVE_MNTENT], - [ AC_CHECK_HEADERS(mntent.h, - have_mntent=yes) - AC_SUBST(have_mntent) - ]) - -# # Check if we have a mremap call (not on Mac OS X) # AC_DEFUN([AC_HAVE_MREMAP], |