patches/glibc/2.3.3/bad/glibc-2.3.3-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.3/bad/glibc-2.3.3-alpha-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,51 @@
     1.4 +Attempted fix for this error:
     1.5 +
     1.6 +
     1.7 +crosstool-0.30/build/alpha-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.3/build-glibc/libc_pic.os(.text+0xc8bd0): In function `__posix_fallocate64_l64':
     1.8 +: undefined reference to `__GI___pwrite64'
     1.9 +collect2: ld returned 1 exit status
    1.10 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-0.30/build/alpha-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.3/glibc-2.3.3'
    1.11 +make[1]: *** [/home/dank/queue/jobdir.fast2/crosstool-0.30/build/alpha-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.3/build-glibc/libc.so] Error 1
    1.12 +make: *** [all] Error 2
    1.13 +
    1.14 +extracted from GLIBC CVS by Dan Kegel
    1.15 +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.16 +(to match context of...)
    1.17 +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.18 +and rediffed.
    1.19 +
    1.20 +cf. 
    1.21 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
    1.22 +
    1.23 +Originally thought we needed this hunk, too:
    1.24 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
    1.25 +but it seems the sysdep.h change is sufficient, and works better 
    1.26 +when compiling against linux-2.4.
    1.27 +
    1.28 +And then rediffed again against glibc-2.3.3
    1.29 +
    1.30 +--- glibc-2.3.3.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h	Fri Jun 20 09:24:36 2003
    1.31 ++++ glibc-2.3.3/sysdeps/unix/sysv/linux/alpha/sysdep.h	Wed Mar 23 23:59:58 2005
    1.32 +@@ -1,4 +1,4 @@
    1.33 +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
    1.34 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
    1.35 +    Free Software Foundation, Inc.
    1.36 +    This file is part of the GNU C Library.
    1.37 +    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    1.38 +@@ -63,6 +63,16 @@
    1.39 + /* Help old kernel headers where particular syscalls are not available.  */
    1.40 + #ifndef __NR_semtimedop
    1.41 + # define __NR_semtimedop	423
    1.42 ++#endif
    1.43 ++
    1.44 ++/* This is a kludge to make syscalls.list find these under the names
    1.45 ++   pread and pwrite, since some kernel headers define those names
    1.46 ++   and some define the *64 names for the same system calls.  */
    1.47 ++#if !defined __NR_pread && defined __NR_pread64
    1.48 ++# define __NR_pread __NR_pread64
    1.49 ++#endif
    1.50 ++#if !defined __NR_pwrite && defined __NR_pwrite64
    1.51 ++# define __NR_pwrite __NR_pwrite64
    1.52 + #endif
    1.53 + 
    1.54 + /*