Skip to contentSkip to conversation

(PATCH) small fix for building with new gcc

PATCH Filip Kalinski 1 participant 1 message Dec 4, 2001

lore
Share & tools
lore
#0 lore raw

This patch fixes problem with compiling the kernel with gcc 3.x. It does not like that xtime is defined differently in linux/sched.h (as "volatile"), and doesn't want to proceed.

Filip Kali�ski <[email protected]>

kernel/timer.c +1 -1
@@ -32,7 +32,7 @@
 long tick = (1000000 + HZ/2) / HZ;	/* timer interrupt period */
 
 /* The current time */
-struct timeval xtime __attribute__ ((aligned (16)));
+volatile struct timeval xtime __attribute__ ((aligned (16)));
 
 /* Don't completely fail for HZ > 500.  */
 int tickadj = 500/HZ ? : 1;		/* microsecs */