1 --- transmission-1.72/configure.ac.orig 2009-06-17 02:01:56.000000000 +0200
2 +++ transmission-1.72/configure.ac 2009-06-18 18:25:44.000000000 +0200
7 +AC_MSG_CHECKING([for SYS_fallocate])
8 +AC_TRY_LINK([#include <sys/syscall.h>
9 +#include <sys/types.h>],
10 + [return syscall(SYS_fallocate, 0, 0, (loff_t) 0, (loff_t) 0);],
11 + [AC_DEFINE([HAVE_SYS_FALLOCATE],[1],[Defined if you have the SYS_fallocate syscall number])
12 + AC_MSG_RESULT([yes])],
13 + [AC_MSG_RESULT([no])])
15 AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename daemon strcasecmp localtime_r posix_fallocate memmem])
18 --- transmission-1.72/libtransmission/fdlimit.c.orig 2009-06-17 02:01:44.000000000 +0200
19 +++ transmission-1.72/libtransmission/fdlimit.c 2009-06-18 18:24:45.000000000 +0200
24 +#ifdef HAVE_SYS_FALLOCATE
25 + #include <linux/falloc.h>
26 + #include <sys/syscall.h>
33 success = !fcntl( fd, F_PREALLOCATE, &fst );
36 +# ifdef HAVE_SYS_FALLOCATE
39 + success = !syscall( SYS_fallocate, fd, FALLOC_FL_KEEP_SIZE, 0, (loff_t)length );
42 # ifdef HAVE_POSIX_FALLOCATE