aboutsummaryrefslogtreecommitdiffstats
path: root/caputils
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-08-21 12:08:41 -0700
committerGuy Harris <guy@alum.mit.edu>2018-08-21 19:09:23 +0000
commite8c3075bb6ab0d8a20362f6b19f291e8673f9730 (patch)
treedd362f4daa4a42154694e12a99769e6bb3249811 /caputils
parent1efc9234ea602ac1d3349458140e4274c3cf5465 (diff)
Clean up includes for SIOCGIFDESCR.
Change-Id: Ib92f7d85355540cff23f7bb08db911f200541f5f Reviewed-on: https://code.wireshark.org/review/29231 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'caputils')
-rw-r--r--caputils/capture-pcap-util.c14
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.
*/