2.2.1 header conflicts

Daniel C. Nurmi (nurmi@mcs.anl.gov)
Fri, 19 Feb 1999 11:19:25 -0600 (EST)


Greetings,

When trying to compile the following simple program:

------------------------------
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/vfs.h>
#include <linux/nfs_fs.h>

main()
{
return 0;
}
------------------------------

..with gcc 2.7.2.3.f.1 and kernel version 2.2.1, the errors at the end of
this message were given.

It seems as though there might be a conflict here. Is the preceding
simple program false?

thank you,
-Dan

-------------------------------

In file included from /usr/include/linux/sched.h:69,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/linux/time.h:69: warning: `FD_SET' redefined
/usr/include/sys/select.h:60: warning: this is the location of the previous definition
/usr/include/linux/time.h:70: warning: `FD_CLR' redefined
/usr/include/sys/select.h:61: warning: this is the location of the previous definition
/usr/include/linux/time.h:71: warning: `FD_ISSET' redefined
/usr/include/sys/select.h:62: warning: this is the location of the previous definition
/usr/include/linux/time.h:72: warning: `FD_ZERO' redefined
/usr/include/sys/select.h:63: warning: this is the location of the previous definition
In file included from /usr/include/linux/signal.h:5,
from /usr/include/linux/nfs_fs.h:12,
from /tmp/test.c:9:
/usr/include/asm/siginfo.h:48: parse error before `clock_t'
/usr/include/asm/siginfo.h:48: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:48: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:49: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:50: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:62: parse error before `}'
/usr/include/asm/siginfo.h:62: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:63: parse error before `}'
/usr/include/asm/siginfo.h:63: warning: data definition has no type or storage class
In file included from /usr/include/linux/vfs.h:4,
from /usr/include/linux/fs.h:14,
from /usr/include/linux/capability.h:13,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:8,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/asm/statfs.h:12: redefinition of `struct statfs'
In file included from /usr/include/linux/sched.h:13,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/linux/times.h:5: parse error before `clock_t'
/usr/include/linux/times.h:5: warning: no semicolon at end of struct or union
/usr/include/linux/times.h:6: warning: data definition has no type or storage class
/usr/include/linux/times.h:7: parse error before `tms_cutime'
/usr/include/linux/times.h:7: warning: data definition has no type or storage class
/usr/include/linux/times.h:8: parse error before `tms_cstime'
/usr/include/linux/times.h:8: warning: data definition has no type or storage class
In file included from /usr/include/linux/sched.h:14,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/linux/timex.h:159: field `time' has incomplete type
In file included from /usr/include/linux/sched.h:17,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/asm/semaphore.h:134: warning: `struct task_struct' declared inside parameter list
/usr/include/asm/semaphore.h:134: warning: its scope is only this definition or declaration,
/usr/include/asm/semaphore.h:134: warning: which is probably not what you want.
/usr/include/asm/semaphore.h: In function `waking_non_zero':
/usr/include/asm/semaphore.h:141: `PAGE_MASK' undeclared (first use this function)
/usr/include/asm/semaphore.h:141: (Each undeclared identifier is reported only once
/usr/include/asm/semaphore.h:141: for each function it appears in.)
/usr/include/linux/time.h: At top level:
In file included from /usr/include/linux/sched.h:69,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/linux/time.h:9: redefinition of `struct timespec'
/usr/include/linux/time.h:51: parse error before `suseconds_t'
/usr/include/linux/time.h:51: warning: no semicolon at end of struct or union
/usr/include/linux/time.h:88: field `it_interval' has incomplete type
/usr/include/linux/time.h:89: field `it_value' has incomplete type
In file included from /usr/include/linux/sched.h:71,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/linux/resource.h:22: field `ru_utime' has incomplete type
/usr/include/linux/resource.h:23: field `ru_stime' has incomplete type
In file included from /usr/include/linux/sched.h:74,
from /usr/include/linux/nfs_fs.h:13,
from /tmp/test.c:9:
/usr/include/asm/processor.h:278: warning: `struct task_struct' declared inside parameter list
/usr/include/asm/processor.h:282: warning: `struct task_struct' declared inside parameter list
In file included from /usr/include/linux/nfs_fs.h:14,
from /tmp/test.c:9:
/usr/include/linux/in.h:110: parse error before `sa_family_t'
/usr/include/linux/in.h:110: warning: no semicolon at end of struct or union
/usr/include/linux/in.h:117: parse error before `}'
In file included from /usr/include/linux/nfs_fs.h:18,
from /tmp/test.c:9:
/usr/include/linux/nfs_mount.h:34: field `addr' has incomplete type

---------------------

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