summaryrefslogtreecommitdiff
path: root/source4/lib/replace/getifaddrs.m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-17 05:53:37 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:44 +0100
commit70cea01a9ec0be4ef9fd141a16b52e8141a1c94a (patch)
tree42d60afac6d684e0fe4180a390eff6bf5dadd98f /source4/lib/replace/getifaddrs.m4
parentb1cd9c39c3465dff1e94241779c643a28d008ce8 (diff)
downloadsamba-70cea01a9ec0be4ef9fd141a16b52e8141a1c94a.tar.gz
samba-70cea01a9ec0be4ef9fd141a16b52e8141a1c94a.tar.bz2
samba-70cea01a9ec0be4ef9fd141a16b52e8141a1c94a.zip
r26487: Cope with systems that don't have struct sockaddr.sa_len.
(This used to be commit 56080469ab28ae5a2f456cced34814d9c33480c6)
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([