Re: Strange problem with param.h/time.h/timex.h

Adrian Bunk (bunk@fs.tum.de)
Thu, 9 May 2002 18:47:05 +0200 (CEST)


On Thu, 9 May 2002, Marc-Christian Petersen wrote:

> Hi there,
>
> i have a strange problem, i don't understand!
>
> In include/asm-i386/param.h i have the following:
>
> #ifndef HZ
> #ifdef CONFIG_100HZ
> #define HZ 100
> #warning Just an info: 100HZ
>...
> #endif
> #endif
>
> If i do make bzImage i get the following error:
>
> /usr/src/linux-2.4.18/include/asm/param.h:7: warning: #warning Just an info:
> 100HZ
> cc -D__KERNEL__ -I/usr/src/linux-2.4.18/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno
> -common -pipe -mpreferred-stack-boundary=2 -march=i686
> -DKBUILD_BASENAME=panic -DEXPORT_SYMTAB -c panic.c
> In file included from /usr/src/linux-2.4.18/include/linux/sched.h:14,
> from panic.c:11:
>
> /usr/src/linux-2.4.18/include/linux/timex.h:78: #error You lose.
>...
> So, all the files have an include to asm/param.h, where HZ is defined. The
> warning defined in param.h is also printed out, but why i got those
> errors?!?! Maybe any have a clue :)

The compilation output already shows that HZ wasn't set while compiling
panic.c (there's none of your "Just an info" messages).

Most likely you've forgotten to add a

#include <linux/config.h>

to your modified param.h and therefore none of your custom CONFIG_*HZ is
defined when the compiler goes through param.h.

> Many thnx!
>
> Please CC, i am not subscribed to the lkml!

cu
Adrian

-- 

You only think this is a free country. Like the US the UK spends a lot of time explaining its a free country because its a police state. Alan Cox

- 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/