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