From: Christoph Hellwig Date: Thu, 15 Feb 2024 06:54:09 +0000 (+0100) Subject: configure: don't check for madvise X-Git-Tag: v6.7.0~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90bcaf5a7569f7f69b6ea57e91017ce6641889b3;p=thirdparty%2Fxfsprogs-dev.git configure: don't check for madvise madvise has been supported since before the dawn of it. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Carlos Maiolino --- diff --git a/configure.ac b/configure.ac index 871dc5cf..0194af7b 100644 --- a/configure.ac +++ b/configure.ac @@ -162,7 +162,6 @@ AC_PACKAGE_NEED_PTHREADMUTEXINIT AC_PACKAGE_NEED_URCU_H AC_PACKAGE_NEED_RCU_INIT -AC_HAVE_MADVISE AC_HAVE_MINCORE AC_HAVE_FALLOCATE AC_HAVE_FIEMAP diff --git a/include/builddefs.in b/include/builddefs.in index eaf555fb..df01cfed 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -90,7 +90,6 @@ ENABLE_SCRUB = @enable_scrub@ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ -HAVE_MADVISE = @have_madvise@ HAVE_MINCORE = @have_mincore@ HAVE_FALLOCATE = @have_fallocate@ HAVE_FIEMAP = @have_fiemap@ diff --git a/io/Makefile b/io/Makefile index 9309f1a4..f01f32d1 100644 --- a/io/Makefile +++ b/io/Makefile @@ -13,19 +13,12 @@ CFILES = init.c \ file.c freeze.c fsuuid.c fsync.c getrusage.c imap.c inject.c label.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 + truncate.c utimes.c fadvise.c sendfile.c madvise.c LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUUID) LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) LLDFLAGS = -static-libtool-libs -ifeq ($(HAVE_MADVISE),yes) -CFILES += madvise.c -LCFLAGS += -DHAVE_MADVISE -else -LSRCFILES += madvise.c -endif - ifeq ($(HAVE_MINCORE),yes) CFILES += mincore.c LCFLAGS += -DHAVE_MINCORE diff --git a/io/io.h b/io/io.h index 56e6159b..2a9ef97c 100644 --- a/io/io.h +++ b/io/io.h @@ -118,12 +118,7 @@ extern void truncate_init(void); extern void utimes_init(void); extern void fadvise_init(void); extern void sendfile_init(void); - -#ifdef HAVE_MADVISE extern void madvise_init(void); -#else -#define madvise_init() do { } while (0) -#endif #ifdef HAVE_MINCORE extern void mincore_init(void); diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index ef20ae41..9586ef03 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -1,21 +1,3 @@ -# -# Check if we have a working madvise system call -# -AC_DEFUN([AC_HAVE_MADVISE], - [ AC_MSG_CHECKING([for madvise ]) - AC_COMPILE_IFELSE( - [ AC_LANG_PROGRAM([[ -#define _GNU_SOURCE -#include - ]], [[ -posix_madvise(0, 0, MADV_NORMAL); - ]]) - ], have_madvise=yes - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) - AC_SUBST(have_madvise) - ]) - # # Check if we have a working mincore system call #