summaryrefslogtreecommitdiffstats
path: root/patches/uClibc-0.9.26/generic/uclibc.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/uClibc-0.9.26/generic/uclibc.diff')
-rw-r--r--patches/uClibc-0.9.26/generic/uclibc.diff107
1 files changed, 107 insertions, 0 deletions
diff --git a/patches/uClibc-0.9.26/generic/uclibc.diff b/patches/uClibc-0.9.26/generic/uclibc.diff
new file mode 100644
index 000000000..442cc6b75
--- /dev/null
+++ b/patches/uClibc-0.9.26/generic/uclibc.diff
@@ -0,0 +1,107 @@
+#
+# Submitted:
+#
+# Ladislav Michl, 2004-10-11
+#
+# Error:
+#
+# uClibc-0.9.26 doesn't compile against newer kernels.
+# - Since 2.4.23 BUS_ISA is called CTL_BUS_ISA
+# - Module support changed in 2.6 kernels
+#
+# Description:
+#
+# http://www.uclibc.org/lists/uclibc-cvs/2004-January/004248.html
+# http://solar.physics.montana.edu/hypermail/linux-vax/2548.html
+#
+# State:
+#
+# Fixed in CVS version.
+
+diff -Naur uClibc-0.9.26-orig/libc/sysdeps/linux/arm/ioperm.c uClibc-0.9.26/libc/sysdeps/linux/arm/ioperm.c
+--- uClibc-0.9.26-orig/libc/sysdeps/linux/arm/ioperm.c 2002-11-04 00:18:09.000000000 +0100
++++ uClibc-0.9.26/libc/sysdeps/linux/arm/ioperm.c 2004-10-11 16:28:01.000000000 +0200
+@@ -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)
+diff -Naur uClibc-0.9.26-orig/libc/sysdeps/linux/common/create_module.c uClibc-0.9.26/libc/sysdeps/linux/common/create_module.c
+--- uClibc-0.9.26-orig/libc/sysdeps/linux/common/create_module.c 2003-08-27 15:17:07.000000000 +0200
++++ uClibc-0.9.26/libc/sysdeps/linux/common/create_module.c 2004-10-11 15:56:37.000000000 +0200
+@@ -29,6 +29,8 @@
+
+ //#define __NR_create_module 127
+
++#ifdef __NR_create_module
++
+ #if defined(__i386__) || defined(__m68k__) || defined(__arm__) || defined(__cris__) || defined(__i960__)
+ #define __NR___create_module __NR_create_module
+ #ifdef __STR_NR_create_module
+@@ -64,4 +66,11 @@
+ _syscall2(unsigned long, create_module, const char *, name, size_t, size);
+ #endif
+
++#else
++unsigned long create_module(const char *name, size_t size)
++{
++ __set_errno(ENOSYS);
++ return (unsigned long)-1;
++}
++#endif
+
+diff -Naur uClibc-0.9.26-orig/libc/sysdeps/linux/common/syscalls.c uClibc-0.9.26/libc/sysdeps/linux/common/syscalls.c
+--- uClibc-0.9.26-orig/libc/sysdeps/linux/common/syscalls.c 2004-01-02 09:47:22.000000000 +0100
++++ uClibc-0.9.26/libc/sysdeps/linux/common/syscalls.c 2004-10-11 16:12:57.000000000 +0200
+@@ -1412,11 +1412,16 @@
+ #endif
+
+ //#define __NR_get_kernel_syms 130
++
++#ifdef __NR_get_kernel_syms
++
+ #ifdef L_get_kernel_syms
+ struct kernel_sym;
+ _syscall1(int, get_kernel_syms, struct kernel_sym *, table);
+ #endif
+
++#endif /* __NR_get_kernel_syms */
++
+ //#define __NR_quotactl 131
+ #ifdef __NR_quotactl
+ #ifdef L_quotactl
+
+_______________________________________________
+ptxdist mailing list
+ptxdist@pengutronix.de
+http://metis.pengutronix.de/cgi-bin/mailman/listinfo/ptxdist
+