diff options
Diffstat (limited to 'caputils/capture-pcap-util.c')
-rw-r--r-- | caputils/capture-pcap-util.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/caputils/capture-pcap-util.c b/caputils/capture-pcap-util.c index 88419676bd..9a5ea26cd3 100644 --- a/caputils/capture-pcap-util.c +++ b/caputils/capture-pcap-util.c @@ -18,7 +18,6 @@ #include <stdio.h> #include <limits.h> #include <string.h> -#include <errno.h> #include <sys/types.h> @@ -26,10 +25,6 @@ #include <sys/socket.h> #endif -#ifdef HAVE_SYS_SOCKIO_H -#include <sys/sockio.h> -#endif - #include "ws_attributes.h" /* @@ -81,6 +76,15 @@ #include "caputils/capture_win_ifnames.h" /* windows friendly interface names */ #endif +#if defined(__FreeBSD__) || defined(__OpenBSD__) +/* + * Needed for the code to get a device description. + */ +#include <errno.h> +#include <net/if.h> +#include <sys/sockio.h> +#endif + /* * Standard secondary message for unexpected errors. */ |