packages: transmission/transmission-preallocate_syscall.patch - updated for...

charles charles at pld-linux.org
Sat Sep 19 16:01:50 CEST 2009


Author: charles                      Date: Sat Sep 19 14:01:50 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated for 1.75

---- Files affected:
packages/transmission:
   transmission-preallocate_syscall.patch (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: packages/transmission/transmission-preallocate_syscall.patch
diff -u /dev/null packages/transmission/transmission-preallocate_syscall.patch:1.5
--- /dev/null	Sat Sep 19 16:01:50 2009
+++ packages/transmission/transmission-preallocate_syscall.patch	Sat Sep 19 16:01:44 2009
@@ -0,0 +1,44 @@
+--- transmission-1.74/configure.ac.orig	2009-08-25 01:43:04.000000000 +0200
++++ transmission-1.74/configure.ac	2009-09-03 06:00:40.000000000 +0200
+@@ -75,6 +75,14 @@
+ AC_HEADER_STDC
+ AC_HEADER_TIME
+ 
++AC_MSG_CHECKING([for SYS_fallocate])
++AC_TRY_LINK([#include <sys/syscall.h>
++#include <sys/types.h>],
++            [return syscall(SYS_fallocate, 0, 0, (loff_t) 0, (loff_t) 0);],
++            [AC_DEFINE([HAVE_SYS_FALLOCATE],[1],[Defined if you have the SYS_fallocate syscall number])
++             AC_MSG_RESULT([yes])],
++            [AC_MSG_RESULT([no])])
++
+ AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename strcasecmp localtime_r posix_fallocate memmem strtold])
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+--- transmission-1.73/libtransmission/fdlimit.c.orig	2009-07-18 03:20:54.000000000 +0200
++++ transmission-1.73/libtransmission/fdlimit.c	2009-07-25 00:17:11.000000000 +0200
+@@ -43,6 +43,11 @@
+  #include <fcntl.h>
+ #endif
+ 
++#ifdef HAVE_SYS_FALLOCATE
++ #include <linux/falloc.h>
++ #include <sys/syscall.h>
++#endif
++
+ #ifdef HAVE_XFS_XFS_H
+  #include <xfs/xfs.h>
+ #endif
+@@ -172,6 +177,12 @@
+             success = !fcntl( fd, F_PREALLOCATE, &fst );
+         }
+ # endif
++# ifdef HAVE_SYS_FALLOCATE
++        if( !success )
++        {
++            success = !syscall( SYS_fallocate, fd, FALLOC_FL_KEEP_SIZE, 0, (loff_t)length );
++        }
++# endif
+ # ifdef HAVE_POSIX_FALLOCATE
+         if( !success )
+         {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/transmission/transmission-preallocate_syscall.patch?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list