diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2012-04-18 16:51:45 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2012-04-18 16:51:45 -0700 |
commit | 875ae1c0b59c862df6d05abac4535d35485ae884 (patch) | |
tree | 9ff9e2033e79f0bd433e1e3423fdd06b9c2ebc6d | |
parent | 156360f5baf95ef3b30ac19872dd22cc4e019be6 (diff) | |
download | libnet-875ae1c0b59c862df6d05abac4535d35485ae884.tar.gz |
netinet/in.h is needed for IPPROTO_ and sockaddr_in (reported by Dirk Meyer)
-rw-r--r-- | libnet/src/libnet_checksum.c | 2 | ||||
-rw-r--r-- | libnet/src/libnet_if_addr.c | 3 | ||||
-rw-r--r-- | libnet/src/libnet_pblock.c | 2 | ||||
-rw-r--r-- | libnet/src/libnet_raw.c | 5 |
4 files changed, 12 insertions, 0 deletions
diff --git a/libnet/src/libnet_checksum.c b/libnet/src/libnet_checksum.c index cd8099f..37423ed 100644 --- a/libnet/src/libnet_checksum.c +++ b/libnet/src/libnet_checksum.c @@ -39,6 +39,8 @@ #include "../include/win32/libnet.h" #endif +#include <netinet/in.h> + /* FIXME - unit test these - 0 is debian's version, else is -RC1's */ /* Note about aliasing warning: * diff --git a/libnet/src/libnet_if_addr.c b/libnet/src/libnet_if_addr.c index e3e179f..f7c9e50 100644 --- a/libnet/src/libnet_if_addr.c +++ b/libnet/src/libnet_if_addr.c @@ -41,6 +41,9 @@ #ifdef HAVE_SYS_SOCKIO_H #include <sys/sockio.h> #endif + +#include <netinet/in.h> + #include "../include/ifaddrlist.h" #define MAX_IPADDR 512 diff --git a/libnet/src/libnet_pblock.c b/libnet/src/libnet_pblock.c index d051c94..b51f1fb 100644 --- a/libnet/src/libnet_pblock.c +++ b/libnet/src/libnet_pblock.c @@ -38,7 +38,9 @@ #else #include "../include/win32/libnet.h" #endif + #include <assert.h> +#include <netinet/in.h> libnet_pblock_t * libnet_pblock_probe(libnet_t *l, libnet_ptag_t ptag, uint32_t b_len, uint8_t type) diff --git a/libnet/src/libnet_raw.c b/libnet/src/libnet_raw.c index 93e4958..8a96a05 100644 --- a/libnet/src/libnet_raw.c +++ b/libnet/src/libnet_raw.c @@ -39,6 +39,11 @@ #include "../include/win32/libnet.h" #endif +#include <netinet/in.h> + +/* TODO this doesn't make any sense, the code in the #else branch is littered + with conditionals on __WIN32__ that are never reachable, what happened? + */ #if defined (__WIN32__) int libnet_open_raw4(libnet_t *l) |