patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch
changeset 1 eeea35fbf182
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,54 @@
     1.4 +Fix for this error:
     1.5 +
     1.6 +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':
     1.7 +: undefined reference to `__GI___pwrite64'
     1.8 +collect2: ld returned 1 exit status
     1.9 +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
    1.10 +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'
    1.11 +make: *** [all] Error 2
    1.12 +
    1.13 +extracted from GLIBC CVS by Dan Kegel
    1.14 +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'
    1.15 +(to match context of...)
    1.16 +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'
    1.17 +and rediffed.
    1.18 +
    1.19 +cf. 
    1.20 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
    1.21 +
    1.22 +Originally thought we needed this hunk, too:
    1.23 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
    1.24 +but it seems the sysdep.h change is sufficient, and works better 
    1.25 +when compiling against linux-2.4.
    1.26 +
    1.27 +===================================================================
    1.28 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old	2004-05-24 22:21:44.000000000 -0700
    1.29 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h	2004-05-24 22:22:48.000000000 -0700
    1.30 +@@ -1,4 +1,4 @@
    1.31 +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
    1.32 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
    1.33 +    Free Software Foundation, Inc.
    1.34 +    This file is part of the GNU C Library.
    1.35 +    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    1.36 +@@ -60,6 +60,21 @@
    1.37 + #define __NR_osf_getsysinfo	256
    1.38 + #define __NR_osf_setsysinfo	257
    1.39 + 
    1.40 ++/* Help old kernel headers where particular syscalls are not available.  */
    1.41 ++#ifndef __NR_semtimedop
    1.42 ++# define __NR_semtimedop	423
    1.43 ++#endif
    1.44 ++
    1.45 ++/* This is a kludge to make syscalls.list find these under the names
    1.46 ++   pread and pwrite, since some kernel headers define those names
    1.47 ++   and some define the *64 names for the same system calls.  */
    1.48 ++#if !defined __NR_pread && defined __NR_pread64
    1.49 ++# define __NR_pread __NR_pread64
    1.50 ++#endif
    1.51 ++#if !defined __NR_pwrite && defined __NR_pwrite64
    1.52 ++# define __NR_pwrite __NR_pwrite64
    1.53 ++#endif
    1.54 ++
    1.55 + /*
    1.56 +  * In order to get the hidden arguments for rt_sigaction set up
    1.57 +  * properly, we need to call the assembly version.  Detect this in the