Fix sa_len detection on FreeBSD.
authorMichael Tuexen <tuexen@wireshark.org>
Thu, 11 Aug 2016 13:32:21 +0000 (15:32 +0200)
committerMichael Tüxen <tuexen@wireshark.org>
Thu, 11 Aug 2016 13:34:27 +0000 (13:34 +0000)
FreeBSD requires socket.h to be included when testing if struct
sockaddr contains sa_len.

Change-Id: Ibe18a88ce19a4e8487bb00d7fa822a380ec8c98d
Reviewed-on: https://code.wireshark.org/review/17008
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
configure.ac

index 82f91ba1634cb27f6957274bc9fb17a9d333a81f..3f4625498390c676224543c845fbf21ef56ee8c3 100644 (file)
@@ -2331,7 +2331,13 @@ AC_CHECK_MEMBERS([struct stat.st_flags])
 # We need to know whether "struct sockaddr" has an "sa_len" member
 # for get_interface_list().
 
-AC_CHECK_MEMBERS([struct sockaddr.sa_len])
+AC_CHECK_MEMBERS([struct sockaddr.sa_len],,,
+                 [#ifdef HAVE_SYS_TYPES_H
+                  #include <sys/types.h>
+                  #endif
+                  #ifdef HAVE_SYS_SOCKET_H
+                  #include <sys/socket.h>
+                  #endif])
 
 # We must know our byte order
 AC_C_BIGENDIAN