Non-standard LFS v5-chap6: redefinition of `struct timespec? compiling sysklogd-1.4.1

Joel Miller cheeziologist at
Mon Jan 5 16:19:33 PST 2004

On Mon, 05 Jan 2004 22:14:58 +0000, Duarte Cordeiro 
<Duarte.Cordeiro at> wrote:

> Hi all,
>  first the apologies: sorry for the long post and for my english :)
>  I've been following the guide, and until now eveything went smooth or 
> was
> solved by visiting the wiki or hints pages.
> I have all standard packages except for kernel-2.6.0 and 
> module-init-tools
> While trying to compile sysklogd-1.4.1 I get the following error:
> gcc  -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce 
> -DFSSTND  -c
> ksym_mod.c
> In file included from /usr/include/linux/timex.h:186,
>                  from /usr/include/linux/sched.h:11,
>                  from /usr/include/linux/module.h:10,
>                  from ksym_mod.c:96:
> /usr/include/linux/time.h:9: error: redefinition of `struct timespec'
> /usr/include/linux/time.h:15: error: redefinition of `struct timeval'
> In file included from /usr/include/linux/jiffies.h:6,
> ...
> And so on.
> I googled it and it's because I'm compiling it against kernel-2.6 
> headers.

This is very much an unsolved debate. The current thing people are doing 
is to used "sanitized" headers in /usr/include when using a 2.6 kernel. 
More information on this can be found at and 
look at the 2.6 kernel hint and the NPTL hint.

Registered LFS User 6929
Registered Linux User 298182

More information about the lfs-support mailing list