(PATCH) small fix for building with new gcc

Filip Kalinski (fk181140@zodiac.mimuw.edu.pl)
Mon, 03 Dec 2001 23:46:35 +0100


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 <filon@pld.org.pl>

--- linux-vanilla/kernel/timer.c Sun Nov 4 16:27:47 2001
+++ linux-modfied/kernel/timer.c Fri Nov 23 23:58:34 2001
@@ -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 */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/