patches/glibc/2.9/260-fadvise64_64.patch
author Matthieu Crapet <mcrapet@gmail.com>
Wed Jun 06 12:03:12 2012 +0200 (2012-06-06)
changeset 2991 252ade1e9e17
parent 1201 c9967a6e3b25
permissions -rw-r--r--
libc/eglibc: fix missing LIBC_TRY_CC_OPTION definition (eglibc 2.15)

Upstream SVN is currently broken:
http://www.eglibc.org/svn/branches/eglibc-2_15/libc/

LIBC_TRY_CC_OPTION macro is not defined in aclocal.m4.
This patch fix the configure script.

Once upstream branch will be fixed this patch could be reverted.

Related patch (committed to eglibc trunk):
Use autoconf macro for testing compiler options with empty input
http://sourceware.org/ml/libc-alpha/2012-03/msg00816.html

Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>

diff -r 1f6c8e4b2b92 -r d10afc5bcc25
patches/eglibc/2_15/110-aclocal-LIBC_TRY_CC_OPTION.patch
     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  }