Update brcm63xx patch to run on 2.6.19, remove binary hacks patch till we update...
[openwrt.git] / target / linux / generic-2.4 / patches / 006-gcc4_fixes.patch
1 diff -rupN linux-2.4.32/Makefile linux-2.4.32.gcc4-fixes-v12/Makefile
2 --- linux-2.4.32/Makefile 2005-11-17 13:27:30.000000000 +0100
3 +++ linux-2.4.32.gcc4-fixes-v12/Makefile 2005-11-17 13:32:13.000000000 +0100
4 @@ -93,11 +93,17 @@ CPPFLAGS := -D__KERNEL__ -I$(HPATH)
5
6 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
7 -fno-strict-aliasing -fno-common
8 +CFLAGS += -fno-builtin-sprintf
9 ifndef CONFIG_FRAME_POINTER
10 CFLAGS += -fomit-frame-pointer
11 endif
12 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
13
14 +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
15 +
16 +# disable pointer signedness warnings in gcc 4.0
17 +CFLAGS += $(call check_gcc,-Wno-pointer-sign,)
18 +
19 #
20 # ROOT_DEV specifies the default root-device when making the image.
21 # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
22 diff -rupN linux-2.4.32/arch/i386/Makefile linux-2.4.32.gcc4-fixes-v12/arch/i386/Makefile
23 --- linux-2.4.32/arch/i386/Makefile 2004-11-17 18:36:41.000000000 +0100
24 +++ linux-2.4.32.gcc4-fixes-v12/arch/i386/Makefile 2005-11-17 13:32:13.000000000 +0100
25 @@ -23,8 +23,6 @@ LINKFLAGS =-T $(TOPDIR)/arch/i386/vmlinu
26
27 CFLAGS += -pipe
28
29 -check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
30 -
31 # prevent gcc from keeping the stack 16 byte aligned
32 CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
33
34 diff -rupN linux-2.4.32/arch/mips/Makefile linux-2.4.32.gcc4-fixes-v12/arch/mips/Makefile
35 --- linux-2.4.32/arch/mips/Makefile 2005-01-19 18:00:52.000000000 +0100
36 +++ linux-2.4.32.gcc4-fixes-v12/arch/mips/Makefile 2005-11-17 13:32:13.000000000 +0100
37 @@ -30,8 +30,6 @@ endif
38
39 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
40
41 -check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
42 -
43 #
44 #
45 # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel
46 diff -rupN linux-2.4.32/arch/mips64/Makefile linux-2.4.32.gcc4-fixes-v12/arch/mips64/Makefile
47 --- linux-2.4.32/arch/mips64/Makefile 2005-01-19 18:00:52.000000000 +0100
48 +++ linux-2.4.32.gcc4-fixes-v12/arch/mips64/Makefile 2005-11-17 13:32:13.000000000 +0100
49 @@ -26,7 +26,6 @@ ifdef CONFIG_CROSSCOMPILE
50 CROSS_COMPILE = $(tool-prefix)
51 endif
52
53 -check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
54 check_gas = $(shell if $(CC) $(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
55
56 #
57 diff -rupN linux-2.4.32/arch/ppc/kernel/open_pic_defs.h linux-2.4.32.gcc4-fixes-v12/arch/ppc/kernel/open_pic_defs.h
58 --- linux-2.4.32/arch/ppc/kernel/open_pic_defs.h 2003-06-14 13:30:19.000000000 +0200
59 +++ linux-2.4.32.gcc4-fixes-v12/arch/ppc/kernel/open_pic_defs.h 2005-11-17 13:32:13.000000000 +0100
60 @@ -172,9 +172,6 @@ struct OpenPIC {
61 OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
62 };
63
64 -extern volatile struct OpenPIC *OpenPIC;
65 -
66 -
67 /*
68 * Current Task Priority Register
69 */
70 diff -rupN linux-2.4.32/arch/x86_64/Makefile linux-2.4.32.gcc4-fixes-v12/arch/x86_64/Makefile
71 --- linux-2.4.32/arch/x86_64/Makefile 2004-04-14 20:22:20.000000000 +0200
72 +++ linux-2.4.32.gcc4-fixes-v12/arch/x86_64/Makefile 2005-11-17 13:32:13.000000000 +0100
73 @@ -38,8 +38,6 @@ OBJCOPY=$(CROSS_COMPILE)objcopy -O binar
74 LDFLAGS=-e stext
75 LINKFLAGS =-T $(TOPDIR)/arch/x86_64/vmlinux.lds $(LDFLAGS)
76
77 -check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then echo "$(1)"; else echo "$(2)"; fi)
78 -
79 CFLAGS += -mno-red-zone
80 CFLAGS += -mcmodel=kernel
81 CFLAGS += -pipe
82 diff -rupN linux-2.4.32/arch/x86_64/ia32/ia32entry.S linux-2.4.32.gcc4-fixes-v12/arch/x86_64/ia32/ia32entry.S
83 --- linux-2.4.32/arch/x86_64/ia32/ia32entry.S 2005-01-19 18:00:53.000000000 +0100
84 +++ linux-2.4.32.gcc4-fixes-v12/arch/x86_64/ia32/ia32entry.S 2005-11-17 13:32:13.000000000 +0100
85 @@ -113,9 +113,18 @@ quiet_ni_syscall:
86 PTREGSCALL stub32_fork, sys32_fork
87 PTREGSCALL stub32_clone, sys32_clone
88 PTREGSCALL stub32_vfork, sys32_vfork
89 - PTREGSCALL stub32_iopl, sys_iopl
90 PTREGSCALL stub32_rt_sigsuspend, sys_rt_sigsuspend
91
92 + .macro PTREGSCALL3 label, func, arg
93 + .globl \label
94 +\label:
95 + leaq \func(%rip),%rax
96 + leaq -ARGOFFSET+8(%rsp),\arg /* 8 for return address */
97 + jmp ia32_ptregs_common
98 + .endm
99 +
100 + PTREGSCALL3 stub32_iopl, sys_iopl, %rsi
101 +
102 ENTRY(ia32_ptregs_common)
103 popq %r11
104 SAVE_REST
105 diff -rupN linux-2.4.32/arch/x86_64/kernel/entry.S linux-2.4.32.gcc4-fixes-v12/arch/x86_64/kernel/entry.S
106 --- linux-2.4.32/arch/x86_64/kernel/entry.S 2003-11-29 00:28:11.000000000 +0100
107 +++ linux-2.4.32.gcc4-fixes-v12/arch/x86_64/kernel/entry.S 2005-11-17 13:32:13.000000000 +0100
108 @@ -249,7 +249,16 @@ intret_signal_test:
109 PTREGSCALL stub_vfork, sys_vfork
110 PTREGSCALL stub_rt_sigsuspend, sys_rt_sigsuspend
111 PTREGSCALL stub_sigaltstack, sys_sigaltstack
112 - PTREGSCALL stub_iopl, sys_iopl
113 +
114 + .macro PTREGSCALL3 label,func,arg
115 + .globl \label
116 +\label:
117 + leaq \func(%rip),%rax
118 + leaq -ARGOFFSET+8(%rsp),\arg /* 8 for return address */
119 + jmp ptregscall_common
120 + .endm
121 +
122 + PTREGSCALL3 stub_iopl, sys_iopl, %rsi
123
124 ENTRY(ptregscall_common)
125 popq %r11
126 diff -rupN linux-2.4.32/arch/x86_64/kernel/ioport.c linux-2.4.32.gcc4-fixes-v12/arch/x86_64/kernel/ioport.c
127 --- linux-2.4.32/arch/x86_64/kernel/ioport.c 2003-11-29 00:28:11.000000000 +0100
128 +++ linux-2.4.32.gcc4-fixes-v12/arch/x86_64/kernel/ioport.c 2005-11-17 13:32:13.000000000 +0100
129 @@ -81,9 +81,9 @@ asmlinkage long sys_ioperm(unsigned long
130 * code.
131 */
132
133 -asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs)
134 +asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs)
135 {
136 - unsigned int old = (regs.eflags >> 12) & 3;
137 + unsigned int old = (regs->eflags >> 12) & 3;
138
139 if (level > 3)
140 return -EINVAL;
141 @@ -92,6 +92,6 @@ asmlinkage long sys_iopl(unsigned int le
142 if (!capable(CAP_SYS_RAWIO))
143 return -EPERM;
144 }
145 - regs.eflags = (regs.eflags & 0xffffffffffffcfff) | (level << 12);
146 + regs->eflags = (regs->eflags &~ 0x3000UL) | (level << 12);
147 return 0;
148 }
149 diff -rupN linux-2.4.32/drivers/acpi/bus.c linux-2.4.32.gcc4-fixes-v12/drivers/acpi/bus.c
150 --- linux-2.4.32/drivers/acpi/bus.c 2005-01-19 18:00:53.000000000 +0100
151 +++ linux-2.4.32.gcc4-fixes-v12/drivers/acpi/bus.c 2005-11-17 13:32:13.000000000 +0100
152 @@ -623,7 +623,7 @@ acpi_bus_generate_event (
153 int data)
154 {
155 struct acpi_bus_event *event = NULL;
156 - u32 flags = 0;
157 + unsigned long flags = 0;
158
159 ACPI_FUNCTION_TRACE("acpi_bus_generate_event");
160
161 @@ -656,7 +656,7 @@ int
162 acpi_bus_receive_event (
163 struct acpi_bus_event *event)
164 {
165 - u32 flags = 0;
166 + unsigned long flags = 0;
167 struct acpi_bus_event *entry = NULL;
168
169 DECLARE_WAITQUEUE(wait, current);
170 diff -rupN linux-2.4.32/drivers/sound/sound_firmware.c linux-2.4.32.gcc4-fixes-v12/drivers/sound/sound_firmware.c
171 --- linux-2.4.32/drivers/sound/sound_firmware.c 2001-02-22 15:23:46.000000000 +0100
172 +++ linux-2.4.32.gcc4-fixes-v12/drivers/sound/sound_firmware.c 2005-11-17 13:32:13.000000000 +0100
173 @@ -4,10 +4,11 @@
174 #include <linux/fs.h>
175 #include <linux/mm.h>
176 #include <linux/slab.h>
177 -#include <linux/unistd.h>
178 +static int my_errno;
179 +#define errno my_errno
180 +#include <asm/unistd.h>
181 #include <asm/uaccess.h>
182
183 -static int errno;
184 static int do_mod_firmware_load(const char *fn, char **fp)
185 {
186 int fd;
187 diff -rupN linux-2.4.32/drivers/usb/inode.c linux-2.4.32.gcc4-fixes-v12/drivers/usb/inode.c
188 --- linux-2.4.32/drivers/usb/inode.c 2004-02-18 15:16:23.000000000 +0100
189 +++ linux-2.4.32.gcc4-fixes-v12/drivers/usb/inode.c 2005-11-17 13:32:13.000000000 +0100
190 @@ -41,6 +41,9 @@
191 #include <linux/usbdevice_fs.h>
192 #include <asm/uaccess.h>
193
194 +static struct inode_operations usbdevfs_bus_inode_operations;
195 +static struct file_operations usbdevfs_bus_file_operations;
196 +
197 /* --------------------------------------------------------------------- */
198
199 /*
200 diff -rupN linux-2.4.32/fs/hfs/trans.c linux-2.4.32.gcc4-fixes-v12/fs/hfs/trans.c
201 --- linux-2.4.32/fs/hfs/trans.c 2001-02-22 15:23:47.000000000 +0100
202 +++ linux-2.4.32.gcc4-fixes-v12/fs/hfs/trans.c 2005-11-17 13:32:13.000000000 +0100
203 @@ -33,6 +33,7 @@
204 #include <linux/hfs_fs_sb.h>
205 #include <linux/hfs_fs_i.h>
206 #include <linux/hfs_fs.h>
207 +#include <linux/compiler.h>
208
209 /*================ File-local variables ================*/
210
211 @@ -78,7 +79,7 @@ static unsigned char mac2latin_map[128]
212 *
213 * Given a hexadecimal digit in ASCII, return the integer representation.
214 */
215 -static inline const unsigned char dehex(char c) {
216 +static inline __attribute_const__ unsigned char dehex(char c) {
217 if ((c>='0')&&(c<='9')) {
218 return c-'0';
219 }
220 diff -rupN linux-2.4.32/include/asm-i386/byteorder.h linux-2.4.32.gcc4-fixes-v12/include/asm-i386/byteorder.h
221 --- linux-2.4.32/include/asm-i386/byteorder.h 2003-06-14 13:30:27.000000000 +0200
222 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-i386/byteorder.h 2005-11-17 13:32:13.000000000 +0100
223 @@ -2,6 +2,7 @@
224 #define _I386_BYTEORDER_H
225
226 #include <asm/types.h>
227 +#include <linux/compiler.h>
228
229 #ifdef __GNUC__
230
231 @@ -10,7 +11,7 @@
232 #include <linux/config.h>
233 #endif
234
235 -static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
236 +static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
237 {
238 #ifdef CONFIG_X86_BSWAP
239 __asm__("bswap %0" : "=r" (x) : "0" (x));
240 @@ -26,7 +27,7 @@ static __inline__ __const__ __u32 ___arc
241
242 /* gcc should generate this for open coded C now too. May be worth switching to
243 it because inline assembly cannot be scheduled. -AK */
244 -static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
245 +static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
246 {
247 __asm__("xchgb %b0,%h0" /* swap bytes */
248 : "=q" (x)
249 diff -rupN linux-2.4.32/include/asm-i386/processor.h linux-2.4.32.gcc4-fixes-v12/include/asm-i386/processor.h
250 --- linux-2.4.32/include/asm-i386/processor.h 2004-02-18 15:16:24.000000000 +0100
251 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-i386/processor.h 2005-11-17 13:32:13.000000000 +0100
252 @@ -72,7 +72,6 @@ struct cpuinfo_x86 {
253 */
254
255 extern struct cpuinfo_x86 boot_cpu_data;
256 -extern struct tss_struct init_tss[NR_CPUS];
257
258 #ifdef CONFIG_SMP
259 extern struct cpuinfo_x86 cpu_data[];
260 @@ -357,6 +356,8 @@ struct tss_struct {
261 unsigned long __cacheline_filler[5];
262 };
263
264 +extern struct tss_struct init_tss[NR_CPUS];
265 +
266 struct thread_struct {
267 unsigned long esp0;
268 unsigned long eip;
269 diff -rupN linux-2.4.32/include/asm-i386/string.h linux-2.4.32.gcc4-fixes-v12/include/asm-i386/string.h
270 --- linux-2.4.32/include/asm-i386/string.h 2001-08-12 11:35:53.000000000 +0200
271 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-i386/string.h 2005-11-17 13:32:13.000000000 +0100
272 @@ -337,7 +337,7 @@ extern void __struct_cpy_bug (void);
273 #define struct_cpy(x,y) \
274 ({ \
275 if (sizeof(*(x)) != sizeof(*(y))) \
276 - __struct_cpy_bug; \
277 + __struct_cpy_bug(); \
278 memcpy(x, y, sizeof(*(x))); \
279 })
280
281 diff -rupN linux-2.4.32/include/asm-m68k/setup.h linux-2.4.32.gcc4-fixes-v12/include/asm-m68k/setup.h
282 --- linux-2.4.32/include/asm-m68k/setup.h 2000-01-29 13:07:40.000000000 +0100
283 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-m68k/setup.h 2005-11-17 13:32:13.000000000 +0100
284 @@ -361,12 +361,13 @@ extern int m68k_is040or060;
285 #ifndef __ASSEMBLY__
286 extern int m68k_num_memory; /* # of memory blocks found (and used) */
287 extern int m68k_realnum_memory; /* real # of memory blocks found */
288 -extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
289
290 struct mem_info {
291 unsigned long addr; /* physical address of memory chunk */
292 unsigned long size; /* length of memory chunk (in bytes) */
293 };
294 +
295 +extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
296 #endif
297
298 #endif /* __KERNEL__ */
299 diff -rupN linux-2.4.32/include/asm-ppc/byteorder.h linux-2.4.32.gcc4-fixes-v12/include/asm-ppc/byteorder.h
300 --- linux-2.4.32/include/asm-ppc/byteorder.h 2003-06-14 13:30:28.000000000 +0200
301 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-ppc/byteorder.h 2005-11-17 13:32:13.000000000 +0100
302 @@ -2,6 +2,7 @@
303 #define _PPC_BYTEORDER_H
304
305 #include <asm/types.h>
306 +#include <linux/compiler.h>
307
308 #ifdef __GNUC__
309 #ifdef __KERNEL__
310 @@ -50,7 +51,7 @@ extern __inline__ void st_le64(volatile
311 __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (taddr+4));
312 }
313
314 -static __inline__ __const__ __u16 ___arch__swab16(__u16 value)
315 +static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 value)
316 {
317 __u16 result;
318
319 @@ -58,7 +59,7 @@ static __inline__ __const__ __u16 ___arc
320 return result;
321 }
322
323 -static __inline__ __const__ __u32 ___arch__swab32(__u32 value)
324 +static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 value)
325 {
326 __u32 result;
327
328 diff -rupN linux-2.4.32/include/asm-ppc/time.h linux-2.4.32.gcc4-fixes-v12/include/asm-ppc/time.h
329 --- linux-2.4.32/include/asm-ppc/time.h 2003-08-25 20:07:49.000000000 +0200
330 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-ppc/time.h 2005-11-17 13:32:13.000000000 +0100
331 @@ -12,6 +12,7 @@
332 #include <linux/config.h>
333 #include <linux/mc146818rtc.h>
334 #include <linux/threads.h>
335 +#include <linux/compiler.h>
336
337 #include <asm/processor.h>
338
339 @@ -57,7 +58,7 @@ static __inline__ void set_dec(unsigned
340 /* Accessor functions for the timebase (RTC on 601) registers. */
341 /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
342 #ifdef CONFIG_6xx
343 -extern __inline__ int const __USE_RTC(void) {
344 +extern __inline__ int __attribute_const__ __USE_RTC(void) {
345 return (mfspr(SPRN_PVR)>>16) == 1;
346 }
347 #else
348 diff -rupN linux-2.4.32/include/asm-x86_64/byteorder.h linux-2.4.32.gcc4-fixes-v12/include/asm-x86_64/byteorder.h
349 --- linux-2.4.32/include/asm-x86_64/byteorder.h 2002-11-30 17:12:31.000000000 +0100
350 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-x86_64/byteorder.h 2005-11-17 13:32:13.000000000 +0100
351 @@ -2,16 +2,17 @@
352 #define _X86_64_BYTEORDER_H
353
354 #include <asm/types.h>
355 +#include <linux/compiler.h>
356
357 #ifdef __GNUC__
358
359 -static __inline__ __const__ __u64 ___arch__swab64(__u64 x)
360 +static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x)
361 {
362 __asm__("bswapq %0" : "=r" (x) : "0" (x));
363 return x;
364 }
365
366 -static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
367 +static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
368 {
369 __asm__("bswapl %0" : "=r" (x) : "0" (x));
370 return x;
371 diff -rupN linux-2.4.32/include/asm-x86_64/processor.h linux-2.4.32.gcc4-fixes-v12/include/asm-x86_64/processor.h
372 --- linux-2.4.32/include/asm-x86_64/processor.h 2005-11-17 13:27:30.000000000 +0100
373 +++ linux-2.4.32.gcc4-fixes-v12/include/asm-x86_64/processor.h 2005-11-17 13:32:13.000000000 +0100
374 @@ -68,7 +68,6 @@ struct cpuinfo_x86 {
375 #define X86_VENDOR_UNKNOWN 0xff
376
377 extern struct cpuinfo_x86 boot_cpu_data;
378 -extern struct tss_struct init_tss[NR_CPUS];
379
380 #ifdef CONFIG_SMP
381 extern struct cpuinfo_x86 cpu_data[];
382 @@ -300,6 +299,8 @@ struct tss_struct {
383 u32 io_bitmap[IO_BITMAP_SIZE];
384 } __attribute__((packed)) ____cacheline_aligned;
385
386 +extern struct tss_struct init_tss[NR_CPUS];
387 +
388 struct thread_struct {
389 unsigned long rsp0;
390 unsigned long rip;
391 diff -rupN linux-2.4.32/include/linux/byteorder/swab.h linux-2.4.32.gcc4-fixes-v12/include/linux/byteorder/swab.h
392 --- linux-2.4.32/include/linux/byteorder/swab.h 2002-11-30 17:12:31.000000000 +0100
393 +++ linux-2.4.32.gcc4-fixes-v12/include/linux/byteorder/swab.h 2005-11-17 13:32:13.000000000 +0100
394 @@ -15,6 +15,8 @@
395 *
396 */
397
398 +#include <linux/compiler.h>
399 +
400 /* casts are necessary for constants, because we never know how for sure
401 * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
402 */
403 @@ -156,7 +158,7 @@
404 #endif /* OPTIMIZE */
405
406
407 -static __inline__ __const__ __u16 __fswab16(__u16 x)
408 +static __inline__ __attribute_const__ __u16 __fswab16(__u16 x)
409 {
410 return __arch__swab16(x);
411 }
412 @@ -169,7 +171,7 @@ static __inline__ void __swab16s(__u16 *
413 __arch__swab16s(addr);
414 }
415
416 -static __inline__ __const__ __u32 __fswab24(__u32 x)
417 +static __inline__ __attribute_const__ __u32 __fswab24(__u32 x)
418 {
419 return __arch__swab24(x);
420 }
421 @@ -182,7 +184,7 @@ static __inline__ void __swab24s(__u32 *
422 __arch__swab24s(addr);
423 }
424
425 -static __inline__ __const__ __u32 __fswab32(__u32 x)
426 +static __inline__ __attribute_const__ __u32 __fswab32(__u32 x)
427 {
428 return __arch__swab32(x);
429 }
430 @@ -196,7 +198,7 @@ static __inline__ void __swab32s(__u32 *
431 }
432
433 #ifdef __BYTEORDER_HAS_U64__
434 -static __inline__ __const__ __u64 __fswab64(__u64 x)
435 +static __inline__ __attribute_const__ __u64 __fswab64(__u64 x)
436 {
437 # ifdef __SWAB_64_THRU_32__
438 __u32 h = x >> 32;
439 diff -rupN linux-2.4.32/include/linux/compiler.h linux-2.4.32.gcc4-fixes-v12/include/linux/compiler.h
440 --- linux-2.4.32/include/linux/compiler.h 2004-11-17 18:36:42.000000000 +0100
441 +++ linux-2.4.32.gcc4-fixes-v12/include/linux/compiler.h 2005-11-17 13:32:13.000000000 +0100
442 @@ -27,6 +27,12 @@
443 #define __attribute_used__ /* not implemented */
444 #endif /* __GNUC__ */
445
446 +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
447 +#define __attribute_const__ __attribute__((__const__))
448 +#else
449 +#define __attribute_const__ /* unimplemented */
450 +#endif
451 +
452 #if __GNUC__ == 3
453 #if __GNUC_MINOR__ >= 1
454 # define inline __inline__ __attribute__((always_inline))
455 diff -rupN linux-2.4.32/include/linux/fs.h linux-2.4.32.gcc4-fixes-v12/include/linux/fs.h
456 --- linux-2.4.32/include/linux/fs.h 2005-04-04 19:56:05.000000000 +0200
457 +++ linux-2.4.32.gcc4-fixes-v12/include/linux/fs.h 2005-11-17 13:32:13.000000000 +0100
458 @@ -1559,7 +1559,6 @@ static inline int is_mounted(kdev_t dev)
459 unsigned long generate_cluster(kdev_t, int b[], int);
460 unsigned long generate_cluster_swab32(kdev_t, int b[], int);
461 extern kdev_t ROOT_DEV;
462 -extern char root_device_name[];
463
464
465 extern void show_buffers(void);
466 diff -rupN linux-2.4.32/include/linux/ufs_fs.h linux-2.4.32.gcc4-fixes-v12/include/linux/ufs_fs.h
467 --- linux-2.4.32/include/linux/ufs_fs.h 2001-11-23 22:40:15.000000000 +0100
468 +++ linux-2.4.32.gcc4-fixes-v12/include/linux/ufs_fs.h 2005-11-17 13:32:13.000000000 +0100
469 @@ -555,7 +555,6 @@ extern struct buffer_head * ufs_bread (s
470 extern struct file_operations ufs_dir_operations;
471
472 /* super.c */
473 -extern struct file_system_type ufs_fs_type;
474 extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
475 extern void ufs_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
476 extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
477 diff -rupN linux-2.4.32/include/linux/usbdevice_fs.h linux-2.4.32.gcc4-fixes-v12/include/linux/usbdevice_fs.h
478 --- linux-2.4.32/include/linux/usbdevice_fs.h 2003-11-29 00:28:14.000000000 +0100
479 +++ linux-2.4.32.gcc4-fixes-v12/include/linux/usbdevice_fs.h 2005-11-17 13:32:13.000000000 +0100
480 @@ -185,8 +185,6 @@ extern struct file_operations usbdevfs_d
481 extern struct file_operations usbdevfs_devices_fops;
482 extern struct file_operations usbdevfs_device_file_operations;
483 extern struct inode_operations usbdevfs_device_inode_operations;
484 -extern struct inode_operations usbdevfs_bus_inode_operations;
485 -extern struct file_operations usbdevfs_bus_file_operations;
486 extern void usbdevfs_conn_disc_event(void);
487
488 #endif /* __KERNEL__ */
489 diff -rupN linux-2.4.32/include/net/icmp.h linux-2.4.32.gcc4-fixes-v12/include/net/icmp.h
490 --- linux-2.4.32/include/net/icmp.h 2001-04-28 12:35:26.000000000 +0200
491 +++ linux-2.4.32.gcc4-fixes-v12/include/net/icmp.h 2005-11-17 13:32:13.000000000 +0100
492 @@ -23,6 +23,7 @@
493
494 #include <net/sock.h>
495 #include <net/protocol.h>
496 +#include <net/snmp.h>
497
498 struct icmp_err {
499 int errno;
500 diff -rupN linux-2.4.32/include/net/ipv6.h linux-2.4.32.gcc4-fixes-v12/include/net/ipv6.h
501 --- linux-2.4.32/include/net/ipv6.h 2004-11-17 18:36:43.000000000 +0100
502 +++ linux-2.4.32.gcc4-fixes-v12/include/net/ipv6.h 2005-11-17 13:32:13.000000000 +0100
503 @@ -101,6 +101,7 @@ struct frag_hdr {
504 #ifdef __KERNEL__
505
506 #include <net/sock.h>
507 +#include <net/snmp.h>
508
509 /* sysctls */
510 extern int sysctl_ipv6_bindv6only;
This page took 0.06373 seconds and 5 git commands to generate.