yann@1
|
1 |
Fix for this error:
|
yann@1
|
2 |
|
yann@1
|
3 |
../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
|
yann@1
|
4 |
../sysdeps/unix/sysv/linux/pread.c:52: error: `__NR_pread' undeclared (first use in this function)
|
yann@1
|
5 |
../sysdeps/unix/sysv/linux/pread.c:52: error: (Each undeclared identifier is reported only once
|
yann@1
|
6 |
../sysdeps/unix/sysv/linux/pread.c:52: error: for each function it appears in.)
|
yann@1
|
7 |
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
|
yann@1
|
8 |
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'
|
yann@1
|
9 |
make[1]: *** [posix/subdir_lib] Error 2
|
yann@1
|
10 |
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'
|
yann@1
|
11 |
make: *** [all] Error 2
|
yann@1
|
12 |
|
yann@1
|
13 |
[ Same as glibc-2.3.2-alpha-pwrite.patch except for copyright date ]
|
yann@1
|
14 |
|
yann@1
|
15 |
extracted from GLIBC CVS by Dan Kegel
|
yann@1
|
16 |
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'
|
yann@1
|
17 |
(to match context of...)
|
yann@1
|
18 |
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'
|
yann@1
|
19 |
and rediffed.
|
yann@1
|
20 |
|
yann@1
|
21 |
cf.
|
yann@1
|
22 |
http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
|
yann@1
|
23 |
|
yann@1
|
24 |
Originally thought we needed this hunk, too:
|
yann@1
|
25 |
http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
|
yann@1
|
26 |
but it seems the sysdep.h change is sufficient, and works better
|
yann@1
|
27 |
when compiling against linux-2.4.
|
yann@1
|
28 |
|
yann@1
|
29 |
===================================================================
|
yann@1
|
30 |
--- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old 2004-05-24 22:21:44.000000000 -0700
|
yann@1
|
31 |
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h 2004-05-24 22:22:48.000000000 -0700
|
yann@1
|
32 |
@@ -1,3 +1,3 @@
|
yann@1
|
33 |
-/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
|
yann@1
|
34 |
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2004 Free Software Foundation, Inc.
|
yann@1
|
35 |
This file is part of the GNU C Library.
|
yann@1
|
36 |
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
|
yann@1
|
37 |
@@ -60,6 +60,21 @@
|
yann@1
|
38 |
#define __NR_osf_getsysinfo 256
|
yann@1
|
39 |
#define __NR_osf_setsysinfo 257
|
yann@1
|
40 |
|
yann@1
|
41 |
+/* Help old kernel headers where particular syscalls are not available. */
|
yann@1
|
42 |
+#ifndef __NR_semtimedop
|
yann@1
|
43 |
+# define __NR_semtimedop 423
|
yann@1
|
44 |
+#endif
|
yann@1
|
45 |
+
|
yann@1
|
46 |
+/* This is a kludge to make syscalls.list find these under the names
|
yann@1
|
47 |
+ pread and pwrite, since some kernel headers define those names
|
yann@1
|
48 |
+ and some define the *64 names for the same system calls. */
|
yann@1
|
49 |
+#if !defined __NR_pread && defined __NR_pread64
|
yann@1
|
50 |
+# define __NR_pread __NR_pread64
|
yann@1
|
51 |
+#endif
|
yann@1
|
52 |
+#if !defined __NR_pwrite && defined __NR_pwrite64
|
yann@1
|
53 |
+# define __NR_pwrite __NR_pwrite64
|
yann@1
|
54 |
+#endif
|
yann@1
|
55 |
+
|
yann@1
|
56 |
/*
|
yann@1
|
57 |
* In order to get the hidden arguments for rt_sigaction set up
|
yann@1
|
58 |
* properly, we need to call the assembly version. Detect this in the
|