fix sdk build
[openwrt.git] / openwrt / package / linux / kernel-patches / 313-gcc-4.0-fixes
1 diff -urN linux-2.4.30.old/drivers/i2c/i2c-core.c linux-2.4.30.dev/drivers/i2c/i2c-core.c
2 --- linux-2.4.30.old/drivers/i2c/i2c-core.c 2005-04-29 17:59:04.000000000 +0200
3 +++ linux-2.4.30.dev/drivers/i2c/i2c-core.c 2005-04-29 18:42:37.000000000 +0200
4 @@ -750,7 +750,7 @@
5 msg.addr = client->addr;
6 msg.flags = client->flags & I2C_M_TEN;
7 msg.len = count;
8 - (const char *)msg.buf = buf;
9 + msg.buf = (__u8 *)buf;
10
11 DEB2(printk(KERN_DEBUG "i2c-core.o: master_send: writing %d bytes on %s.\n",
12 count,client->adapter->name));
13 @@ -780,7 +780,7 @@
14 msg.flags = client->flags & I2C_M_TEN;
15 msg.flags |= I2C_M_RD;
16 msg.len = count;
17 - msg.buf = buf;
18 + msg.buf = (__u8 *)buf;
19
20 DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: reading %d bytes on %s.\n",
21 count,client->adapter->name));
22 diff -urN linux-2.4.30.old/drivers/usb/inode.c linux-2.4.30.dev/drivers/usb/inode.c
23 --- linux-2.4.30.old/drivers/usb/inode.c 2004-02-18 14:36:31.000000000 +0100
24 +++ linux-2.4.30.dev/drivers/usb/inode.c 2005-04-29 18:42:37.000000000 +0200
25 @@ -42,6 +42,8 @@
26 #include <asm/uaccess.h>
27
28 /* --------------------------------------------------------------------- */
29 +static struct file_operations usbdevfs_bus_file_operations;
30 +static struct inode_operations usbdevfs_bus_inode_operations;
31
32 /*
33 * This list of superblocks is still used,
34 diff -urN linux-2.4.30.old/include/asm-mips/uaccess.h linux-2.4.30.dev/include/asm-mips/uaccess.h
35 --- linux-2.4.30.old/include/asm-mips/uaccess.h 2005-01-19 15:10:12.000000000 +0100
36 +++ linux-2.4.30.dev/include/asm-mips/uaccess.h 2005-04-29 18:42:37.000000000 +0200
37 @@ -149,7 +149,7 @@
38 * Returns zero on success, or -EFAULT on error.
39 */
40 #define put_user(x,ptr) \
41 - __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
42 + __put_user_check((x),(ptr),sizeof(*(ptr)))
43
44 /*
45 * get_user: - Get a simple variable from user space.
46 @@ -169,7 +169,7 @@
47 * On error, the variable @x is set to zero.
48 */
49 #define get_user(x,ptr) \
50 - __get_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
51 + __get_user_check((x),(ptr),sizeof(*(ptr)))
52
53 /*
54 * __put_user: - Write a simple value into user space, with less checking.
55 @@ -191,7 +191,7 @@
56 * Returns zero on success, or -EFAULT on error.
57 */
58 #define __put_user(x,ptr) \
59 - __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
60 + __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
61
62 /*
63 * __get_user: - Get a simple variable from user space, with less checking.
64 @@ -214,7 +214,7 @@
65 * On error, the variable @x is set to zero.
66 */
67 #define __get_user(x,ptr) \
68 - __get_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
69 + __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
70
71 struct __large_struct { unsigned long buf[100]; };
72 #define __m(x) (*(struct __large_struct *)(x))
73 @@ -232,7 +232,7 @@
74 #define __get_user_nocheck(x,ptr,size) \
75 ({ \
76 long __gu_err = 0; \
77 - __typeof(*(ptr)) __gu_val = 0; \
78 + __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \
79 long __gu_addr; \
80 __gu_addr = (long) (ptr); \
81 switch (size) { \
82 diff -urN linux-2.4.30.old/include/linux/byteorder/swab.h linux-2.4.30.dev/include/linux/byteorder/swab.h
83 --- linux-2.4.30.old/include/linux/byteorder/swab.h 2002-11-29 00:53:15.000000000 +0100
84 +++ linux-2.4.30.dev/include/linux/byteorder/swab.h 2005-04-29 18:42:37.000000000 +0200
85 @@ -156,7 +156,7 @@
86 #endif /* OPTIMIZE */
87
88
89 -static __inline__ __const__ __u16 __fswab16(__u16 x)
90 +static __inline__ __u16 __fswab16(__u16 x)
91 {
92 return __arch__swab16(x);
93 }
94 @@ -169,7 +169,7 @@
95 __arch__swab16s(addr);
96 }
97
98 -static __inline__ __const__ __u32 __fswab24(__u32 x)
99 +static __inline__ __u32 __fswab24(__u32 x)
100 {
101 return __arch__swab24(x);
102 }
103 @@ -182,7 +182,7 @@
104 __arch__swab24s(addr);
105 }
106
107 -static __inline__ __const__ __u32 __fswab32(__u32 x)
108 +static __inline__ __u32 __fswab32(__u32 x)
109 {
110 return __arch__swab32(x);
111 }
112 @@ -196,7 +196,7 @@
113 }
114
115 #ifdef __BYTEORDER_HAS_U64__
116 -static __inline__ __const__ __u64 __fswab64(__u64 x)
117 +static __inline__ __u64 __fswab64(__u64 x)
118 {
119 # ifdef __SWAB_64_THRU_32__
120 __u32 h = x >> 32;
121 diff -urN linux-2.4.30.old/include/linux/fs.h linux-2.4.30.dev/include/linux/fs.h
122 --- linux-2.4.30.old/include/linux/fs.h 2005-04-29 17:59:08.000000000 +0200
123 +++ linux-2.4.30.dev/include/linux/fs.h 2005-04-29 18:42:37.000000000 +0200
124 @@ -1563,7 +1563,6 @@
125 unsigned long generate_cluster(kdev_t, int b[], int);
126 unsigned long generate_cluster_swab32(kdev_t, int b[], int);
127 extern kdev_t ROOT_DEV;
128 -extern char root_device_name[];
129
130
131 extern void show_buffers(void);
132 diff -urN linux-2.4.30.old/include/linux/i2c.h linux-2.4.30.dev/include/linux/i2c.h
133 --- linux-2.4.30.old/include/linux/i2c.h 2005-01-19 15:10:12.000000000 +0100
134 +++ linux-2.4.30.dev/include/linux/i2c.h 2005-04-29 18:42:37.000000000 +0200
135 @@ -70,7 +70,7 @@
136
137 /* Transfer num messages.
138 */
139 -extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
140 +extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num);
141
142 /*
143 * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
144 @@ -197,7 +197,7 @@
145 to NULL. If an adapter algorithm can do SMBus access, set
146 smbus_xfer. If set to NULL, the SMBus protocol is simulated
147 using common I2C messages */
148 - int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
149 + int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
150 int num);
151 int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
152 unsigned short flags, char read_write,
153 diff -urN linux-2.4.30.old/include/linux/usbdevice_fs.h linux-2.4.30.dev/include/linux/usbdevice_fs.h
154 --- linux-2.4.30.old/include/linux/usbdevice_fs.h 2003-11-28 19:26:21.000000000 +0100
155 +++ linux-2.4.30.dev/include/linux/usbdevice_fs.h 2005-04-29 18:42:37.000000000 +0200
156 @@ -185,8 +185,6 @@
157 extern struct file_operations usbdevfs_devices_fops;
158 extern struct file_operations usbdevfs_device_file_operations;
159 extern struct inode_operations usbdevfs_device_inode_operations;
160 -extern struct inode_operations usbdevfs_bus_inode_operations;
161 -extern struct file_operations usbdevfs_bus_file_operations;
162 extern void usbdevfs_conn_disc_event(void);
163
164 #endif /* __KERNEL__ */
165 diff -urN linux-2.4.30.old/include/net/icmp.h linux-2.4.30.dev/include/net/icmp.h
166 --- linux-2.4.30.old/include/net/icmp.h 2001-11-22 20:47:15.000000000 +0100
167 +++ linux-2.4.30.dev/include/net/icmp.h 2005-04-29 18:42:37.000000000 +0200
168 @@ -23,6 +23,7 @@
169
170 #include <net/sock.h>
171 #include <net/protocol.h>
172 +#include <net/snmp.h>
173
174 struct icmp_err {
175 int errno;
176 diff -urN linux-2.4.30.old/include/net/ipv6.h linux-2.4.30.dev/include/net/ipv6.h
177 --- linux-2.4.30.old/include/net/ipv6.h 2004-11-17 12:54:22.000000000 +0100
178 +++ linux-2.4.30.dev/include/net/ipv6.h 2005-04-29 18:42:37.000000000 +0200
179 @@ -19,6 +19,7 @@
180 #include <asm/hardirq.h>
181 #include <net/ndisc.h>
182 #include <net/flow.h>
183 +#include <net/snmp.h>
184
185 #define SIN6_LEN_RFC2133 24
186
187 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
188 --- linux-2.4.30.old/include/linux/netfilter_ipv4/ip_tables.h 2005-04-29 17:59:08.000000000 +0200
189 +++ linux-2.4.30.dev/include/linux/netfilter_ipv4/ip_tables.h 2005-04-29 19:06:36.000000000 +0200
190 @@ -283,7 +283,7 @@
191 struct ipt_entry entrytable[0];
192 };
193
194 -extern struct semaphore ipt_mutex;
195 +// extern struct semaphore ipt_mutex;
196
197 /* Standard return verdict, or do jump. */
198 #define IPT_STANDARD_TARGET ""
This page took 0.04925 seconds and 5 git commands to generate.