This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
compile errors for include sys/socket.h
- From: Franca <franca dot delmastro at iit dot cnr dot it>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Jan 2007 13:28:30 +0000 (UTC)
- Subject: compile errors for include sys/socket.h
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