mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
(trunk) remove the test for fallocate(), since we used posix_fallocate() as a fallback anyway. <http://www.lucas-nussbaum.net/blog/?p=332> says: "Glibc does have posix_fallocate(), which implements the POSIX interface. posix_fallocate() is wired to use the fallocate system call, for sufficiently modern versions of glibc."
This commit is contained in:
@@ -81,12 +81,6 @@ fi
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_TIME
|
||||
|
||||
AC_MSG_CHECKING([for fallocate])
|
||||
AC_TRY_LINK([#include <linux/falloc.h>],
|
||||
[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
|
||||
|
||||
@@ -43,10 +43,6 @@
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FALLOCATE
|
||||
#include <linux/falloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XFS_XFS_H
|
||||
#include <xfs/xfs.h>
|
||||
#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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user