]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.2.5/arm-ctl_bus_isa.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.2.5 / arm-ctl_bus_isa.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- glibc-2.2.5/sysdeps/unix/sysv/linux/arm/ioperm.c~arm-ctl_bus_isa.patch      2004-09-03 19:00:33.000000000 -0500
7 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/arm/ioperm.c    2004-09-03 19:00:37.000000000 -0500
8 @@ -47,6 +47,12 @@
9  #include <asm/page.h>
10  #include <sys/sysctl.h>
11  
12 +/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
13 +#include <linux/version.h>
14 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
15 +#define CTL_BUS_ISA BUS_ISA    /* and hope it's not the one from linux/input.h */
16 +#endif
17 +
18  #define PATH_ARM_SYSTYPE       "/etc/arm_systype"
19  #define PATH_CPUINFO           "/proc/cpuinfo"
20  
21 @@ -80,7 +86,7 @@
22   * Initialize I/O system.  There are several ways to get the information
23   * we need.  Each is tried in turn until one succeeds.
24   *
25 - * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
26 + * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
27   *    but not all kernels support it.
28   *
29   * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
30 @@ -100,8 +106,8 @@
31  {
32    char systype[256];
33    int i, n;
34 -  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
35 -  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
36 +  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
37 +  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
38    size_t len = sizeof(io.base);
39  
40    if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)