Re: 1.3.5 include files.

Linus Torvalds (Linus.Torvalds@cs.helsinki.fi)
Fri, 30 Jun 1995 10:06:54 +0300


"Michael H. Price II": "1.3.5 include files." (Jun 30, 1:48):
> I received the following errors with kernel source 1.3.5 and libc 5.1.4
> when compiling a program:
>
> gcc -c -pipe -O2 -m386 -I. -I../bsd -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\" ipcs.c -o ipcs.o
> In file included from /usr/include/sys/sem.h:7,
> from ipcs.c:16:
> /usr/include/linux/sem.h:106: syntax error before `int'
> /usr/include/linux/sem.h:107: syntax error before `int'
> /usr/include/linux/sem.h:108: syntax error before `int'

Umm.. Lines 106, 107 and 108 are all protected by a

#ifdef __KERNEL__
...
#endif

pair. Why does __KERNEL__ get defined if you aren't compiling the
kernel?

Linus