This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

socket.h / in.h


hello....


well.. i'm trying create a socket, but when i include
some lib's like:
#include <sys/socket.h>
#include <netinet/in.h>

my program don't compile. how i fix this errors ?



freebsd# gcc teste.c -o teste
In file included from teste.c:3:
/usr/include/sys/socket.h:52: syntax error before
`sa_family_t'
/usr/include/sys/socket.h:52: warning: data definition
has no type or storage class
/usr/include/sys/socket.h:163: syntax error before
`u_char'
/usr/include/sys/socket.h:174: syntax error before
`u_short'
/usr/include/sys/socket.h:188: syntax error before
`u_char'
/usr/include/sys/socket.h:190: `int64_t' undeclared
here (not in a function)
/usr/include/sys/socket.h:190: `u_char' undeclared
here (not in a function)
/usr/include/sys/socket.h:190: size of array
`__ss_pad1' is too large
........
In file included from /usr/include/netinet/in.h:467,
                 from teste.c:4:
/usr/include/netinet6/in6.h:122: syntax error before
`u_int8_t'
/usr/include/netinet6/in6.h:144: syntax error before
`u_int8_t'
/usr/include/netinet6/in6.h:149: syntax error before
`u_int32_t'
/usr/include/netinet6/in6.h:612: syntax error before
`*'
/usr/include/netinet6/in6.h:614: syntax error before
`*'
/usr/include/netinet6/in6.h:614: warning: data
definition has no type or storage class
.........


gcc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release) [FreeBSD-4.6]



tkz for all!


Augusto Flavio

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]