diff --git a/configure.ac b/configure.ac index 16f19e808..c70280584 100644 --- a/configure.ac +++ b/configure.ac @@ -81,12 +81,6 @@ fi AC_HEADER_STDC AC_HEADER_TIME -AC_MSG_CHECKING([for fallocate]) -AC_TRY_LINK([#include ], - [return fallocate(-1,0,0,0);], - [AC_DEFINE([HAVE_FALLOCATE],[1],[Defined if fallocate() exists]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename daemon strcasecmp localtime_r posix_fallocate memmem]) AC_PROG_INSTALL AC_PROG_MAKE_SET diff --git a/libtransmission/fdlimit.c b/libtransmission/fdlimit.c index 3a3e3c143..f3e2224c5 100644 --- a/libtransmission/fdlimit.c +++ b/libtransmission/fdlimit.c @@ -43,10 +43,6 @@ #include #endif -#ifdef HAVE_FALLOCATE - #include -#endif - #ifdef HAVE_XFS_XFS_H #include #endif @@ -180,12 +176,6 @@ preallocateFileFull( const char * filename, uint64_t length ) success = !fcntl( fd, F_PREALLOCATE, &fst ); } # endif -# ifdef HAVE_FALLOCATE - if( !success ) - { - success = !fallocate( fd, FALLOC_FL_KEEP_SIZE, 0, length ); - } -# endif # ifdef HAVE_POSIX_FALLOCATE if( !success ) {