Header Problem
-
hi,
hab da ein kleines Problem mit manchen Headern, wenn ich sie einbinde.
$ gcc xxx.c -o xxx -D FREEBSD
In file included from xcxx.c:48:
/usr/include/netinet/ip.h:73: fieldip_src' has incomplete type /usr/include/netinet/ip.h:73: field
ip_dst' has incomplete type
/usr/include/netinet/ip.h:156: syntax error beforen_long' /usr/include/netinet/ip.h:158: field
ipt_addr' has incomplete type
/usr/include/netinet/ip.h:159: syntax error beforen_long' /usr/include/netinet/ip.h:194: field
ippseudo_src' has incomplete type
/usr/include/netinet/ip.h:195: fieldippseudo_dst' has incomplete type In file included from xxx.c:51: /usr/include/arpa/inet.h:89: warning: parameter has incomplete type /usr/include/arpa/inet.h:92: warning: parameter has incomplete type /usr/include/arpa/inet.h:96: warning: parameter has incomplete type In file included from xxx.c:70: /usr/include/net/bpf.h:123: field
bh_tstamp' has incomplete type#ifdef LINUX #include <crypt.h> #include <linux/if_packet.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <netinet/ip.h> #include <sys/types.h> #include <netinet/tcp.h> #include <arpa/inet.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/if_ether.h> #ifdef FREEBSD #include <sys/types.h> #include <sys/socket.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <netinet/in_systm.h> #include <netinet/in.h> #include <netinet/ip.h> #include <unistd.h> #include <netinet/tcp.h> #include <fcntl.h> #include <sys/ioctl.h> #include <net/bpf.h> #endif
hoffe mir kann da einer behilflich sein.
-
dreh die beiden mal um (testphase)
#include <netinet/in.h> #include <netinet/ip.h>
erst ip, dann in
http://lists.freebsd.org/pipermail/freebsd-hackers/2003-July/001918.html
-
ja, das sieht schon mal nicht schlecht aus
aber es kommt das hier noch:
In file included from xxx.c:58:
/usr/include/netinet/ip.h:156: syntax error beforen_long' /usr/include/netinet/ip.h:159: syntax error before
n_long'
In file included from xxx.c:72:
/usr/include/net/bpf.h:123: field `bh_tstamp' has incomplete type
-
[Nachtrag]
Hab den einen auch noch wegmachen können, nach dem ich den thread gelesen hatte.
Es bleibt nun noch:
In file included from xxx.c:72:
/usr/include/net/bpf.h:123: field `bh_tstamp' has incomplete typeübrig.
-
Args, hab die <sys/time.h> vergessen.
Vielen Dank elise.