]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
configure: don't check for sendfile
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Feb 2024 06:54:08 +0000 (07:54 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 13 Mar 2024 07:48:37 +0000 (08:48 +0100)
sendfile has been supported since Linux 2.2 and glibc 2.1.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
configure.ac
include/builddefs.in
io/Makefile
io/io.h
m4/package_libcdev.m4

index 0b94dab18827defb587f699f4d099f07c7ce8b56..871dc5cf12fb922895b5a4a122de8dcd137ea2d3 100644 (file)
@@ -164,7 +164,6 @@ AC_PACKAGE_NEED_RCU_INIT
 
 AC_HAVE_MADVISE
 AC_HAVE_MINCORE
-AC_HAVE_SENDFILE
 AC_HAVE_FALLOCATE
 AC_HAVE_FIEMAP
 AC_HAVE_PWRITEV2
index 92ecca62c62eb862c6248ee955f42e446db7995d..eaf555fb3b8ce86de49c5c7418d63243b66cd4c6 100644 (file)
@@ -92,7 +92,6 @@ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
 
 HAVE_MADVISE = @have_madvise@
 HAVE_MINCORE = @have_mincore@
-HAVE_SENDFILE = @have_sendfile@
 HAVE_FALLOCATE = @have_fallocate@
 HAVE_FIEMAP = @have_fiemap@
 HAVE_PREADV = @have_preadv@
index a8ea640108a2a272588a34401653b17aafe1affd..9309f1a4ffdeb4a3462715684815abbbcd8eacb8 100644 (file)
@@ -13,7 +13,7 @@ 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
+       truncate.c utimes.c fadvise.c sendfile.c
 
 LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUUID)
 LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG)
@@ -33,13 +33,6 @@ else
 LSRCFILES += mincore.c
 endif
 
-ifeq ($(HAVE_SENDFILE),yes)
-CFILES += sendfile.c
-LCFLAGS += -DHAVE_SENDFILE
-else
-LSRCFILES += sendfile.c
-endif
-
 ifeq ($(HAVE_FIEMAP),yes)
 CFILES += fiemap.c
 LCFLAGS += -DHAVE_FIEMAP
diff --git a/io/io.h b/io/io.h
index 19c84b7077723d987aa266203865d3a8ccecba8c..56e6159b0df77266ed6512dd5d8d0742f3b0e00d 100644 (file)
--- a/io/io.h
+++ b/io/io.h
@@ -117,12 +117,7 @@ extern void                sync_init(void);
 extern void            truncate_init(void);
 extern void            utimes_init(void);
 extern void            fadvise_init(void);
-
-#ifdef HAVE_SENDFILE
 extern void            sendfile_init(void);
-#else
-#define sendfile_init()        do { } while (0)
-#endif
 
 #ifdef HAVE_MADVISE
 extern void            madvise_init(void);
index 53d19a1b603b63021ed5f985157faa3f6fc653d3..ef20ae41ae5861a1ed56cd6de30d226147270a1d 100644 (file)
@@ -34,24 +34,6 @@ mincore(0, 0, 0);
     AC_SUBST(have_mincore)
   ])
 
-#
-# Check if we have a working sendfile system call
-#
-AC_DEFUN([AC_HAVE_SENDFILE],
-  [ AC_MSG_CHECKING([for sendfile ])
-    AC_COMPILE_IFELSE(
-    [  AC_LANG_PROGRAM([[
-#define _GNU_SOURCE
-#include <sys/sendfile.h>
-       ]], [[
-sendfile(0, 0, 0, 0);
-       ]])
-    ], have_sendfile=yes
-       AC_MSG_RESULT(yes),
-       AC_MSG_RESULT(no))
-    AC_SUBST(have_sendfile)
-  ])
-
 #
 # Check if we have a fallocate libc call (Linux)
 #