1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/linux/2.6.8/100-kaz-types.patch Fri Sep 05 10:36:53 2008 +0000
1.3 @@ -0,0 +1,60 @@
1.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
1.5 +
1.6 +In file included from sys/ustat.h:30,
1.7 + from ../sysdeps/unix/sysv/linux/ustat.c:21:
1.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
1.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
1.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
1.11 +make[1]: *** [misc/subdir_lib] Error 2
1.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
1.13 +make: *** [all] Error 2
1.14 +
1.15 +----------- snip ---------------
1.16 +
1.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
1.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
1.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
1.20 + error: redefinition of `struct user_fpu_struct'"
1.21 +To: linux-sh@m17n.org
1.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
1.23 +
1.24 +Hi,
1.25 +
1.26 +Dan Kegel <dank@kegel.com> wrote:
1.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
1.28 +[snip]
1.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
1.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
1.31 +[snip]
1.32 +> The error reminds me of the kind of thing fixed by
1.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
1.34 +
1.35 +It seems that the definitions in asm/user.h and the above patch collide.
1.36 +I'm not sure why you need this patch, but is it needed for the problem
1.37 +about struct ustat that you pointed out in this list, isn't it?
1.38 +I found why I don't hit ustat problem - my local kernel tree includes
1.39 +the following patch, though I can't recall about it.
1.40 +
1.41 +Regards,
1.42 + kaz
1.43 +--
1.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
1.45 +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
1.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
1.47 +@@ -141,6 +141,7 @@
1.48 +
1.49 + #endif /* __KERNEL_STRICT_NAMES */
1.50 +
1.51 ++#ifdef __KERNEL__
1.52 + /*
1.53 + * Below are truly Linux-specific types that should never collide with
1.54 + * any application/library that wants linux/types.h.
1.55 +@@ -152,5 +153,6 @@
1.56 + char f_fname[6];
1.57 + char f_fpack[6];
1.58 + };
1.59 ++#endif
1.60 +
1.61 + #endif /* _LINUX_TYPES_H */
1.62 +
1.63 +