patches/glibc/2.3.6/100-arm-ctl_bus_isa.patch
changeset 2267 7af68e6083aa
parent 2266 a64ae33ea8ae
child 2268 1300e1714c13
     1.1 --- a/patches/glibc/2.3.6/100-arm-ctl_bus_isa.patch	Mon Jan 03 22:02:06 2011 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,53 +0,0 @@
     1.4 -Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
     1.5 -Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
     1.6 -Fixes following error:
     1.7 -
     1.8 -../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
     1.9 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
    1.10 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
    1.11 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
    1.12 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
    1.13 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
    1.14 -../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
    1.15 -../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
    1.16 -make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
    1.17 -
    1.18 -cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
    1.19 -
    1.20 ---- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
    1.21 -+++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
    1.22 -@@ -47,6 +47,12 @@
    1.23 - #include <asm/page.h>
    1.24 - #include <sys/sysctl.h>
    1.25 - 
    1.26 -+/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
    1.27 -+#include <linux/version.h>
    1.28 -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
    1.29 -+#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
    1.30 -+#endif
    1.31 -+
    1.32 - #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
    1.33 - #define PATH_CPUINFO		"/proc/cpuinfo"
    1.34 - 
    1.35 -@@ -80,7 +86,7 @@
    1.36 -  * Initialize I/O system.  There are several ways to get the information
    1.37 -  * we need.  Each is tried in turn until one succeeds.
    1.38 -  *
    1.39 -- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
    1.40 -+ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
    1.41 -  *    but not all kernels support it.
    1.42 -  *
    1.43 -  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
    1.44 -@@ -100,8 +106,8 @@
    1.45 - {
    1.46 -   char systype[256];
    1.47 -   int i, n;
    1.48 --  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
    1.49 --  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
    1.50 -+  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
    1.51 -+  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
    1.52 -   size_t len = sizeof(io.base);
    1.53 - 
    1.54 -   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
    1.55 -
    1.56 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>