From eee979719db7ba3f014fca22d9309bd7fbad2745 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 24 Jan 2004 08:40:27 +0000 Subject: Oleksandr G. Zhadan writes: Hi Eric, The attached diff file includes BUS_ISA fix for kernel since 2.4.23/ Kind regards, Oleks --- libc/sysdeps/linux/arm/ioperm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libc/sysdeps/linux/arm/ioperm.c') diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c index 74a6dc1dc..2fba676b1 100644 --- a/libc/sysdeps/linux/arm/ioperm.c +++ b/libc/sysdeps/linux/arm/ioperm.c @@ -47,6 +47,8 @@ #include #include +#include + #define PATH_ARM_SYSTYPE "/etc/arm_systype" #define PATH_CPUINFO "/proc/cpuinfo" @@ -93,6 +95,8 @@ static struct platform { * 3. Lookup the "system type" field in /proc/cpuinfo. Again, if it * matches an entry in the platform[] table, use the corresponding * values. + * + * 4. BUS_ISA is changed to CTL_BUS_ISA (for kernel since 2.4.23). */ static int @@ -100,8 +104,15 @@ init_iosys (void) { char systype[256]; int i, n; + +#if LINUX_VERSION_CODE < 132119 static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE }; static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT }; +#else + static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE }; + static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT }; +#endif + size_t len = sizeof(io.base); if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0) -- cgit v1.2.3