summaryrefslogtreecommitdiffstats
path: root/package/linux/kernel-patches/313-gcc-4.0-fixes
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-29 17:50:19 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-29 17:50:19 +0000
commit75438517382c13f96dc42070bc67883ba8ddb168 (patch)
treee4275b841b4750b3f970e29b3edf08ed663b97f1 /package/linux/kernel-patches/313-gcc-4.0-fixes
parent658e159aa46b16404194b53a0b2580c8575fa006 (diff)
add some gcc 4.0 fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@764 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/linux/kernel-patches/313-gcc-4.0-fixes')
-rw-r--r--package/linux/kernel-patches/313-gcc-4.0-fixes198
1 files changed, 198 insertions, 0 deletions
diff --git a/package/linux/kernel-patches/313-gcc-4.0-fixes b/package/linux/kernel-patches/313-gcc-4.0-fixes
new file mode 100644
index 000000000..e6703680e
--- /dev/null
+++ b/package/linux/kernel-patches/313-gcc-4.0-fixes
@@ -0,0 +1,198 @@
+diff -urN linux-2.4.30.old/drivers/i2c/i2c-core.c linux-2.4.30.dev/drivers/i2c/i2c-core.c
+--- linux-2.4.30.old/drivers/i2c/i2c-core.c 2005-04-29 17:59:04.000000000 +0200
++++ linux-2.4.30.dev/drivers/i2c/i2c-core.c 2005-04-29 18:42:37.000000000 +0200
+@@ -750,7 +750,7 @@
+ msg.addr = client->addr;
+ msg.flags = client->flags & I2C_M_TEN;
+ msg.len = count;
+- (const char *)msg.buf = buf;
++ msg.buf = (__u8 *)buf;
+
+ DEB2(printk(KERN_DEBUG "i2c-core.o: master_send: writing %d bytes on %s.\n",
+ count,client->adapter->name));
+@@ -780,7 +780,7 @@
+ msg.flags = client->flags & I2C_M_TEN;
+ msg.flags |= I2C_M_RD;
+ msg.len = count;
+- msg.buf = buf;
++ msg.buf = (__u8 *)buf;
+
+ DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: reading %d bytes on %s.\n",
+ count,client->adapter->name));
+diff -urN linux-2.4.30.old/drivers/usb/inode.c linux-2.4.30.dev/drivers/usb/inode.c
+--- linux-2.4.30.old/drivers/usb/inode.c 2004-02-18 14:36:31.000000000 +0100
++++ linux-2.4.30.dev/drivers/usb/inode.c 2005-04-29 18:42:37.000000000 +0200
+@@ -42,6 +42,8 @@
+ #include <asm/uaccess.h>
+
+ /* --------------------------------------------------------------------- */
++static struct file_operations usbdevfs_bus_file_operations;
++static struct inode_operations usbdevfs_bus_inode_operations;
+
+ /*
+ * This list of superblocks is still used,
+diff -urN linux-2.4.30.old/include/asm-mips/uaccess.h linux-2.4.30.dev/include/asm-mips/uaccess.h
+--- linux-2.4.30.old/include/asm-mips/uaccess.h 2005-01-19 15:10:12.000000000 +0100
++++ linux-2.4.30.dev/include/asm-mips/uaccess.h 2005-04-29 18:42:37.000000000 +0200
+@@ -149,7 +149,7 @@
+ * Returns zero on success, or -EFAULT on error.
+ */
+ #define put_user(x,ptr) \
+- __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
++ __put_user_check((x),(ptr),sizeof(*(ptr)))
+
+ /*
+ * get_user: - Get a simple variable from user space.
+@@ -169,7 +169,7 @@
+ * On error, the variable @x is set to zero.
+ */
+ #define get_user(x,ptr) \
+- __get_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
++ __get_user_check((x),(ptr),sizeof(*(ptr)))
+
+ /*
+ * __put_user: - Write a simple value into user space, with less checking.
+@@ -191,7 +191,7 @@
+ * Returns zero on success, or -EFAULT on error.
+ */
+ #define __put_user(x,ptr) \
+- __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
++ __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
+
+ /*
+ * __get_user: - Get a simple variable from user space, with less checking.
+@@ -214,7 +214,7 @@
+ * On error, the variable @x is set to zero.
+ */
+ #define __get_user(x,ptr) \
+- __get_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
++ __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
+
+ struct __large_struct { unsigned long buf[100]; };
+ #define __m(x) (*(struct __large_struct *)(x))
+@@ -232,7 +232,7 @@
+ #define __get_user_nocheck(x,ptr,size) \
+ ({ \
+ long __gu_err = 0; \
+- __typeof(*(ptr)) __gu_val = 0; \
++ __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \
+ long __gu_addr; \
+ __gu_addr = (long) (ptr); \
+ switch (size) { \
+diff -urN linux-2.4.30.old/include/linux/byteorder/swab.h linux-2.4.30.dev/include/linux/byteorder/swab.h
+--- linux-2.4.30.old/include/linux/byteorder/swab.h 2002-11-29 00:53:15.000000000 +0100
++++ linux-2.4.30.dev/include/linux/byteorder/swab.h 2005-04-29 18:42:37.000000000 +0200
+@@ -156,7 +156,7 @@
+ #endif /* OPTIMIZE */
+
+
+-static __inline__ __const__ __u16 __fswab16(__u16 x)
++static __inline__ __u16 __fswab16(__u16 x)
+ {
+ return __arch__swab16(x);
+ }
+@@ -169,7 +169,7 @@
+ __arch__swab16s(addr);
+ }
+
+-static __inline__ __const__ __u32 __fswab24(__u32 x)
++static __inline__ __u32 __fswab24(__u32 x)
+ {
+ return __arch__swab24(x);
+ }
+@@ -182,7 +182,7 @@
+ __arch__swab24s(addr);
+ }
+
+-static __inline__ __const__ __u32 __fswab32(__u32 x)
++static __inline__ __u32 __fswab32(__u32 x)
+ {
+ return __arch__swab32(x);
+ }
+@@ -196,7 +196,7 @@
+ }
+
+ #ifdef __BYTEORDER_HAS_U64__
+-static __inline__ __const__ __u64 __fswab64(__u64 x)
++static __inline__ __u64 __fswab64(__u64 x)
+ {
+ # ifdef __SWAB_64_THRU_32__
+ __u32 h = x >> 32;
+diff -urN linux-2.4.30.old/include/linux/fs.h linux-2.4.30.dev/include/linux/fs.h
+--- linux-2.4.30.old/include/linux/fs.h 2005-04-29 17:59:08.000000000 +0200
++++ linux-2.4.30.dev/include/linux/fs.h 2005-04-29 18:42:37.000000000 +0200
+@@ -1563,7 +1563,6 @@
+ unsigned long generate_cluster(kdev_t, int b[], int);
+ unsigned long generate_cluster_swab32(kdev_t, int b[], int);
+ extern kdev_t ROOT_DEV;
+-extern char root_device_name[];
+
+
+ extern void show_buffers(void);
+diff -urN linux-2.4.30.old/include/linux/i2c.h linux-2.4.30.dev/include/linux/i2c.h
+--- linux-2.4.30.old/include/linux/i2c.h 2005-01-19 15:10:12.000000000 +0100
++++ linux-2.4.30.dev/include/linux/i2c.h 2005-04-29 18:42:37.000000000 +0200
+@@ -70,7 +70,7 @@
+
+ /* Transfer num messages.
+ */
+-extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
++extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num);
+
+ /*
+ * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
+@@ -197,7 +197,7 @@
+ to NULL. If an adapter algorithm can do SMBus access, set
+ smbus_xfer. If set to NULL, the SMBus protocol is simulated
+ using common I2C messages */
+- int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
++ int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
+ int num);
+ int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
+ unsigned short flags, char read_write,
+diff -urN linux-2.4.30.old/include/linux/usbdevice_fs.h linux-2.4.30.dev/include/linux/usbdevice_fs.h
+--- linux-2.4.30.old/include/linux/usbdevice_fs.h 2003-11-28 19:26:21.000000000 +0100
++++ linux-2.4.30.dev/include/linux/usbdevice_fs.h 2005-04-29 18:42:37.000000000 +0200
+@@ -185,8 +185,6 @@
+ extern struct file_operations usbdevfs_devices_fops;
+ extern struct file_operations usbdevfs_device_file_operations;
+ extern struct inode_operations usbdevfs_device_inode_operations;
+-extern struct inode_operations usbdevfs_bus_inode_operations;
+-extern struct file_operations usbdevfs_bus_file_operations;
+ extern void usbdevfs_conn_disc_event(void);
+
+ #endif /* __KERNEL__ */
+diff -urN linux-2.4.30.old/include/net/icmp.h linux-2.4.30.dev/include/net/icmp.h
+--- linux-2.4.30.old/include/net/icmp.h 2001-11-22 20:47:15.000000000 +0100
++++ linux-2.4.30.dev/include/net/icmp.h 2005-04-29 18:42:37.000000000 +0200
+@@ -23,6 +23,7 @@
+
+ #include <net/sock.h>
+ #include <net/protocol.h>
++#include <net/snmp.h>
+
+ struct icmp_err {
+ int errno;
+diff -urN linux-2.4.30.old/include/net/ipv6.h linux-2.4.30.dev/include/net/ipv6.h
+--- linux-2.4.30.old/include/net/ipv6.h 2004-11-17 12:54:22.000000000 +0100
++++ linux-2.4.30.dev/include/net/ipv6.h 2005-04-29 18:42:37.000000000 +0200
+@@ -19,6 +19,7 @@
+ #include <asm/hardirq.h>
+ #include <net/ndisc.h>
+ #include <net/flow.h>
++#include <net/snmp.h>
+
+ #define SIN6_LEN_RFC2133 24
+
+diff -urN linux-2.4.30.old/include/linux/netfilter_ipv4/ip_tables.h linux-2.4.30.dev/include/linux/netfilter_ipv4/ip_tables.h
+--- linux-2.4.30.old/include/linux/netfilter_ipv4/ip_tables.h 2005-04-29 17:59:08.000000000 +0200
++++ linux-2.4.30.dev/include/linux/netfilter_ipv4/ip_tables.h 2005-04-29 19:06:36.000000000 +0200
+@@ -283,7 +283,7 @@
+ struct ipt_entry entrytable[0];
+ };
+
+-extern struct semaphore ipt_mutex;
++// extern struct semaphore ipt_mutex;
+
+ /* Standard return verdict, or do jump. */
+ #define IPT_STANDARD_TARGET ""