yann@1: yann@1: Fixes yann@1: yann@1: In file included from arch/ppc/kernel/time.c:68: yann@1: arch/ppc/kernel/time.c:92: error: static declaration of 'time_offset' follows non-static declaration yann@1: include/linux/timex.h:236: error: previous declaration of 'time_offset' was here yann@1: make[1]: *** [arch/ppc/kernel/time.o] Error 1 yann@1: yann@1: when compiling with gcc-4.0 yann@1: yann@1: Taken from yann@1: http://user.it.uu.se/~mikpe/linux/patches/2.6/patch-gcc4-fixes-v2-2.6.11 yann@1: Also removes some obsolete externs that caused problems for Mike yann@1: Mike's patch has a bit more stuff in it, but this was enough for me yann@1: yann@1: yann@1: diff -rupN linux-2.6.11/arch/ppc/kernel/time.c linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c yann@1: --- linux-2.6.11/arch/ppc/kernel/time.c 2005-03-02 19:24:14.000000000 +0100 yann@1: +++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c 2005-03-02 19:36:26.000000000 +0100 yann@1: @@ -89,7 +89,7 @@ unsigned long tb_to_ns_scale; yann@1: yann@1: extern unsigned long wall_jiffies; yann@1: yann@1: -static long time_offset; yann@1: +static long ppc_time_offset; yann@1: yann@1: DEFINE_SPINLOCK(rtc_lock); yann@1: yann@1: @@ -172,7 +172,7 @@ void timer_interrupt(struct pt_regs * re yann@1: xtime.tv_sec - last_rtc_update >= 659 && yann@1: abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && yann@1: jiffies - wall_jiffies == 1) { yann@1: - if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0) yann@1: + if (ppc_md.set_rtc_time(xtime.tv_sec+1 + ppc_time_offset) == 0) yann@1: last_rtc_update = xtime.tv_sec+1; yann@1: else yann@1: /* Try again one minute later */ yann@1: @@ -289,7 +289,7 @@ void __init time_init(void) yann@1: unsigned old_stamp, stamp, elapsed; yann@1: yann@1: if (ppc_md.time_init != NULL) yann@1: - time_offset = ppc_md.time_init(); yann@1: + ppc_time_offset = ppc_md.time_init(); yann@1: yann@1: if (__USE_RTC()) { yann@1: /* 601 processor: dec counts down by 128 every 128ns */ yann@1: @@ -334,10 +334,10 @@ void __init time_init(void) yann@1: set_dec(tb_ticks_per_jiffy); yann@1: yann@1: /* If platform provided a timezone (pmac), we correct the time */ yann@1: - if (time_offset) { yann@1: - sys_tz.tz_minuteswest = -time_offset / 60; yann@1: + if (ppc_time_offset) { yann@1: + sys_tz.tz_minuteswest = -ppc_time_offset / 60; yann@1: sys_tz.tz_dsttime = 0; yann@1: - xtime.tv_sec -= time_offset; yann@1: + xtime.tv_sec -= ppc_time_offset; yann@1: } yann@1: set_normalized_timespec(&wall_to_monotonic, yann@1: -xtime.tv_sec, -xtime.tv_nsec); yann@1: diff -rupN linux-2.6.11/arch/ppc/syslib/open_pic_defs.h linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h yann@1: --- linux-2.6.11/arch/ppc/syslib/open_pic_defs.h 2005-03-02 19:24:14.000000000 +0100 yann@1: +++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h 2005-03-02 19:36:26.000000000 +0100 yann@1: @@ -172,9 +172,6 @@ struct OpenPIC { yann@1: OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS]; yann@1: }; yann@1: yann@1: -extern volatile struct OpenPIC __iomem *OpenPIC; yann@1: - yann@1: - yann@1: /* yann@1: * Current Task Priority Register yann@1: */ yann@1: diff -rupN linux-2.6.11/include/asm-ppc/prom.h linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h yann@1: --- linux-2.6.11/include/asm-ppc/prom.h 2003-09-28 12:19:57.000000000 +0200 yann@1: +++ linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h 2005-03-02 19:36:26.000000000 +0100 yann@1: @@ -13,9 +13,6 @@ yann@1: typedef void *phandle; yann@1: typedef void *ihandle; yann@1: yann@1: -extern char *prom_display_paths[]; yann@1: -extern unsigned int prom_num_displays; yann@1: - yann@1: struct address_range { yann@1: unsigned int space; yann@1: unsigned int address;