[PATCH 10/27] configure: don't check for sendfile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sendfile has been supported since Linux 2.2 and glibc 2.1.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 configure.ac          |  1 -
 include/builddefs.in  |  1 -
 io/Makefile           |  9 +--------
 io/io.h               |  5 -----
 m4/package_libcdev.m4 | 18 ------------------
 5 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/configure.ac b/configure.ac
index 478eadc6c..cc9d9c268 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/include/builddefs.in b/include/builddefs.in
index 42dc23174..9c7ef93e8 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -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@
diff --git a/io/Makefile b/io/Makefile
index a8ea64010..9309f1a4f 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -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 ad90cf3cb..9f176685e 100644
--- 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);
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 53d19a1b6..ef20ae41a 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -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)
 #
-- 
2.39.2





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux