summaryrefslogtreecommitdiff
path: root/source4/lib/replace/getifaddrs.m4
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/replace/getifaddrs.m4')
-rw-r--r--source4/lib/replace/getifaddrs.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/replace/getifaddrs.m4 b/source4/lib/replace/getifaddrs.m4
index 7e6016ed8f..85f08ee6c3 100644
--- a/source4/lib/replace/getifaddrs.m4
+++ b/source4/lib/replace/getifaddrs.m4
@@ -1,5 +1,11 @@
AC_CHECK_HEADERS([ifaddrs.h])
+dnl Used when getifaddrs is not available
+AC_CHECK_MEMBERS([struct sockaddr.sa_len],
+ [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has a sa_len member])],
+ [],
+ [#include <sys/socket.h>])
+
dnl test for getifaddrs and freeifaddrs
AC_CACHE_CHECK([for getifaddrs and freeifaddrs],samba_cv_HAVE_GETIFADDRS,[
AC_TRY_COMPILE([