From 875ae1c0b59c862df6d05abac4535d35485ae884 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 18 Apr 2012 16:51:45 -0700 Subject: netinet/in.h is needed for IPPROTO_ and sockaddr_in (reported by Dirk Meyer) --- libnet/src/libnet_checksum.c | 2 ++ libnet/src/libnet_if_addr.c | 3 +++ libnet/src/libnet_pblock.c | 2 ++ libnet/src/libnet_raw.c | 5 +++++ 4 files changed, 12 insertions(+) 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 + /* 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 #endif + +#include + #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 +#include 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 + +/* 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) -- cgit v1.2.1