patches/glibc/2.3.2/glibc-2.3.2-sparc64-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-sparc64-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,36 @@
     1.4 +Fix for this error:
     1.5 +
     1.6 +/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/libc_pic.os(.text+0xc4d28): In function `posix_fallocate64':
     1.7 +: undefined reference to `__GI___pwrite64'
     1.8 +collect2: ld returned 1 exit status
     1.9 +make[1]: *** [/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/libc.so] Error 1
    1.10 +
    1.11 +extracted from GLIBC CVS by M.H.VanLeeuwen
    1.12 +
    1.13 +cf. 
    1.14 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
    1.15 +
    1.16 +Originally thought we needed this hunk, too:
    1.17 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
    1.18 +but it seems the sysdep.h change is sufficient, and works better 
    1.19 +when compiling against linux-2.4.
    1.20 +
    1.21 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h.orig	Sat Mar 13 02:01:51 2004
    1.22 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h	Sat Mar 13 02:02:20 2004
    1.23 +@@ -29,6 +29,16 @@
    1.24 + #undef SYS_ify
    1.25 + #define SYS_ify(syscall_name) __NR_##syscall_name
    1.26 + 
    1.27 ++/* This is a kludge to make syscalls.list find these under the names
    1.28 ++   pread and pwrite, since some kernel headers define those names
    1.29 ++   and some define the *64 names for the same system calls.  */
    1.30 ++#if !defined __NR_pread && defined __NR_pread64
    1.31 ++# define __NR_pread __NR_pread64
    1.32 ++#endif
    1.33 ++#if !defined __NR_pwrite && defined __NR_pwrite64
    1.34 ++# define __NR_pwrite __NR_pwrite64
    1.35 ++#endif
    1.36 ++
    1.37 + #ifdef __ASSEMBLER__
    1.38 + 
    1.39 + #define LOADSYSCALL(x) mov __NR_##x, %g1