compile errors for include sys/socket.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all!!
I'm new to this mailing list and I really hope that someone could help me...

I'm trying to compile a C program (implementation of a native method to be 
called by a java program) with gcc-4.1.2 and I obtain the following errors:

gcc -c -Wall  -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include 
-I/usr/lib/jvm/java-1.5.0-sun/include/ 
-I/usr/lib/jvm/java-1.5.0-sun/include/linux -o 
rtnl.o rtnl.c
In file included from /usr/include/sys/uio.h:29,
                 from /usr/include/sys/socket.h:27,
                 from rtnl.c:18:
/usr/include/bits/uio.h:43: error: redefinition of ‘struct iovec’
In file included from /usr/include/sys/socket.h:35,
                 from rtnl.c:18:
/usr/include/bits/socket.h:146: error: redefinition of ‘struct sockaddr’
/usr/include/bits/socket.h:163: error: redefinition of ‘struct 
__kernel_sockaddr_storage’
/usr/include/bits/socket.h:173: error: expected identifier before numeric 
constant
/usr/include/bits/socket.h:216: error: redefinition of ‘struct msghdr’
/usr/include/bits/socket.h:231: error: redefinition of ‘struct cmsghdr’
/usr/include/bits/socket.h:258: error: conflicting types for ‘__cmsg_nxthdr’
/usr/include/linux/socket.h:132: error: previous definition of ‘__cmsg_nxthdr’ 
was here
/usr/include/bits/socket.h:286: error: expected identifier before numeric 
constant
/usr/include/bits/socket.h:297: error: redefinition of ‘struct ucred’
In file included from /usr/include/sys/socket.h:35,
                 from rtnl.c:18:
/usr/include/bits/socket.h:309: error: redefinition of ‘struct linger’
rtnl.c: In function ‘rtnl_receive’:
rtnl.c:308: error: ‘MSG_TRUNC’ undeclared (first use in this function)
rtnl.c:308: error: (Each undeclared identifier is reported only once
rtnl.c:308: error: for each function it appears in.)
make: *** [rtnl.o] Error 1

I'm working on a debian testing, kernel 2.6.18, glibc 2.3.6-2 and libc6.
Do you know if these errors depend on my system configuration?   

I really don't know how to solve these conflicts... 
Any help is greatly appreciated :)
thanks in advance 
Franca
 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux