[uClibc-cvs] uClibc/libc/sysdeps/linux/arm ioperm.c,1.5,1.6

Erik Andersen andersen at uclibc.org
Sat Jan 24 08:40:29 UTC 2004


Update of /var/cvs/uClibc/libc/sysdeps/linux/arm
In directory nail:/tmp/cvs-serv644/libc/sysdeps/linux/arm

Modified Files:
	ioperm.c 
Log Message:
Oleksandr G. Zhadan writes:

Hi Eric,

The attached diff file includes BUS_ISA fix for kernel since 2.4.23/

Kind regards,

Oleks



Index: ioperm.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/arm/ioperm.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ioperm.c	3 Nov 2002 23:18:09 -0000	1.5
+++ ioperm.c	24 Jan 2004 08:40:27 -0000	1.6
@@ -47,6 +47,8 @@
 #include <asm/page.h>
 #include <sys/sysctl.h>
 
+#include <linux/version.h>
+
 #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
 #define PATH_CPUINFO		"/proc/cpuinfo"
 
@@ -93,6 +95,8 @@
  * 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 @@
 {
     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)




More information about the uClibc-cvs mailing list