patches/glibc/2.9/260-fadvise64_64.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
parent 1201 c9967a6e3b25
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 Original patch from: gentoo/src/patchsets/glibc/2.9/1070_all_glibc-fadvise64_64.patch
     2 
     3 -= BEGIN original header =-
     4 ripped from Debian
     5 
     6 -= END original header =-
     7 
     8 diff -durN glibc-2_9.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2_9/sysdeps/unix/sysv/linux/posix_fadvise.c
     9 --- glibc-2_9.orig/sysdeps/unix/sysv/linux/posix_fadvise.c	2003-08-17 02:36:22.000000000 +0200
    10 +++ glibc-2_9/sysdeps/unix/sysv/linux/posix_fadvise.c	2009-02-02 22:00:58.000000000 +0100
    11 @@ -35,6 +35,19 @@
    12      return INTERNAL_SYSCALL_ERRNO (ret, err);
    13    return 0;
    14  #else
    15 +# ifdef __NR_fadvise64_64
    16 +  INTERNAL_SYSCALL_DECL (err);  
    17 +  int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
    18 +			      __LONG_LONG_PAIR ((long) (offset >> 31),
    19 +						(long) offset),
    20 +			      __LONG_LONG_PAIR ((long) (len >> 31),
    21 +						(long) len),
    22 +			      advise);
    23 +  if (INTERNAL_SYSCALL_ERROR_P (ret, err))
    24 +    return INTERNAL_SYSCALL_ERRNO (ret, err);
    25 +  return 0;
    26 +# else
    27    return ENOSYS;
    28 +# endif
    29  #endif
    30  }