2.4.5 gcc3 build patch
We fixed a bug in cv-qualification checking.
timer.c:35: conflicting types for xtime' include/linux/sched.h:540: previous declaration of xtime'
There's no need for the volatile qualification here. One, being a struct it doesn't do any good, and two it's protected by xtime_lock.
r~
timer.c renamed from timer.c.orig +1 -1
@@ -32,7 +32,7 @@long tick = (1000000 +HZ /2 ) /HZ ;/* timer interrupt period */ /* The current time */ -volatile struct timeval xtime __attribute__ ((aligned (16))); +struct timeval xtime __attribute__ ((aligned (16)));/* Don't completely fail for HZ > 500. */ int tickadj =500 /HZ ? :1 ;/* microsecs */
Quoted 7 lines · Richard Henderson
We fixed a bug in cv-qualification checking.
timer.c:35: conflicting types for
xtime' include/linux/sched.h:540: previous declaration ofxtime'There's no need for the volatile qualification here. One, being a struct it doesn't do any good, and two it's protected by
xtime_lock.
wrong, the sec field of xtime is read all the time without any lock. so xtime can change under you it has to be declared volatile or C language will screwup. gcc 3.0 effectively spotted a bug in the kernel that wasn't exporting xtime as volatile.
Right fix is this that I did just about 10 minutes ago after the 3.0 checkout ;)
ftp://ftp.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.6pre2aa2/00_gcc-30-volatile-xtime-1
Andrea