patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 28 21:34:41 2007 +0000 (2007-07-28)
changeset 301 2be7232a73ac
permissions -rw-r--r--
Bump version to 0.2.2.
     1 Fix for this error:
     2 
     3 crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc_pic.os(.text+0xd9b2c): In function `posix_fallocate64':
     4 : undefined reference to `__GI___pwrite64'
     5 collect2: ld returned 1 exit status
     6 make[1]: *** [crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc.so] Error 1
     7 make[1]: Leaving directory `crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2'
     8 make: *** [all] Error 2
     9 
    10 extracted from GLIBC CVS by Dan Kegel
    11 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.14&r2=1.15&cvsroot=glibc'
    12 (to match context of...)
    13 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc'
    14 and rediffed.
    15 
    16 cf. 
    17 http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
    18 
    19 Originally thought we needed this hunk, too:
    20 http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
    21 but it seems the sysdep.h change is sufficient, and works better 
    22 when compiling against linux-2.4.
    23 
    24 ===================================================================
    25 --- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old	2004-05-24 22:21:44.000000000 -0700
    26 +++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h	2004-05-24 22:22:48.000000000 -0700
    27 @@ -1,4 +1,4 @@
    28 -/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
    29 +/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
    30     Free Software Foundation, Inc.
    31     This file is part of the GNU C Library.
    32     Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    33 @@ -60,6 +60,21 @@
    34  #define __NR_osf_getsysinfo	256
    35  #define __NR_osf_setsysinfo	257
    36  
    37 +/* Help old kernel headers where particular syscalls are not available.  */
    38 +#ifndef __NR_semtimedop
    39 +# define __NR_semtimedop	423
    40 +#endif
    41 +
    42 +/* This is a kludge to make syscalls.list find these under the names
    43 +   pread and pwrite, since some kernel headers define those names
    44 +   and some define the *64 names for the same system calls.  */
    45 +#if !defined __NR_pread && defined __NR_pread64
    46 +# define __NR_pread __NR_pread64
    47 +#endif
    48 +#if !defined __NR_pwrite && defined __NR_pwrite64
    49 +# define __NR_pwrite __NR_pwrite64
    50 +#endif
    51 +
    52  /*
    53   * In order to get the hidden arguments for rt_sigaction set up
    54   * properly, we need to call the assembly version.  Detect this in the