Re: 2.6.7-rc2-mm1: compile error in kernel/exit.c

From: Peter Lundkvist
Date: Tue Jun 01 2004 - 14:37:56 EST


Hello,

When trying to to build with a non-standard setting of HZ
(to get rid of the noise generated by my Dell Inspiron 4000):
--- linux-2.6.7/include/asm-i386/param.h.org 2004-06-01 20:19:03.000000000 +0200
+++ linux-2.6.7/include/asm-i386/param.h 2004-06-01 20:50:45.000000000 +0200
@@ -5 +5 @@
-# define HZ 1000 /* Internal kernel timer frequency */
+# define HZ 100 /* Internal kernel timer frequency */

I get the following error (with current Debian unstable gcc-3.3):

In file included from kernel/exit.c:18:
include/linux/acct.h:168:2: invalid preprocessing directive #elseif
make[2]: *** [kernel/exit.o] Error 1
make[1]: *** [kernel] Error 2

corrected by this patch:

--- linux-2.6.7/include/linux/acct.h.org 2004-06-01 20:19:07.000000000 +0200
+++ linux-2.6.7/include/linux/acct.h 2004-06-01 19:03:43.000000000 +0200
@@ -166,5 +166,6 @@
#if HZ == AHZ
/* do nothing */
-#elseif (HZ % AHZ)==0
+#else
+#if (HZ % AHZ)==0
do_div(x, HZ / AHZ);
#else
@@ -172,4 +173,5 @@
do_div(x, HZ);
#endif
+#endif
return x;
}



--
Peter Lundkvist
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/