aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-05-22 19:22:22 -0700
committerGuy Harris <guy@alum.mit.edu>2016-05-23 02:22:51 +0000
commitb831f251eff85c7cc32085bde5bc789f848a301f (patch)
tree5302eac67cfac0bb3b8c648e7328f3fa613da4b1 /wsutil
parentb07d5c73b6e39d0ffc435e4f6c5372ac3d29cc6e (diff)
Include <sys/socket.h>, too.
The Single UNIX Spec says AF_INET and AF_INET6 are defined by <sys/socket.h>, which means you *should* include it if you want those defines, and it doesn't look as if DragonFly BSD's <netinet/in.h> includes it. Do the includes in the order in whcih dumpcap does them. Change-Id: I2ee611fc08a5487d5b8ed48396aa2a49447c881a Reviewed-on: https://code.wireshark.org/review/15542 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/interface.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/wsutil/interface.c b/wsutil/interface.c
index 9a6cca74ba..73e6a01ebf 100644
--- a/wsutil/interface.c
+++ b/wsutil/interface.c
@@ -29,18 +29,26 @@
#include <string.h>
#include <wsutil/inet_addr.h>
-#ifdef HAVE_ARPA_INET_H
- #include <arpa/inet.h>
+#ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
#endif
-#ifdef HAVE_IFADDRS_H
- #include <ifaddrs.h>
+#ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
+#ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_IFADDRS_H
+ #include <ifaddrs.h>
+#endif
+
GSList *local_interfaces_to_list(void)
{
GSList *interfaces = NULL;