aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/linux-2.4/patches/207-gcc_4.0_fixes.patch
blob: e6703680e1136f6969b6e08e05f49cd9fd9cf62e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
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 ""