#include <netinet/tcp.h> and gcc -ansi
Hello!
When a program that #includes <netinet/tcp.h> is compiled with -ansi
"struct tcphdr" is not defined. This is different from #including
<netinet/ip.h> and <netinet/udp.h>, where both "struct iphdr" and
"struct udphdr" are defined.
The problem is that the definition for "struct tcphdr" in netinet/tcp.h
is protected by a "#ifdef __MISC". What's the reason for this, and why
it is not consistent with ip.h and udp.h?
Any suggestions for portability?
Thanks!
Eloy.-
Reply to: