summaryrefslogtreecommitdiff
path: root/source3/lib/replace/getifaddrs.m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-17 05:53:37 +0100
committerMichael Adam <obnox@samba.org>2008-02-19 21:57:46 +0100
commit1de665002c4f3f495214659143736baeeda8ec60 (patch)
treea215aa41ececdb4d2d0a43ada264490dd246590f /source3/lib/replace/getifaddrs.m4
parent621983ed6d110fdc24215ba2963fcd93316accce (diff)
downloadsamba-1de665002c4f3f495214659143736baeeda8ec60.tar.gz
samba-1de665002c4f3f495214659143736baeeda8ec60.tar.bz2
samba-1de665002c4f3f495214659143736baeeda8ec60.zip
r26487: Cope with systems that don't have struct sockaddr.sa_len.
(cherry picked from commit 56080469ab28ae5a2f456cced34814d9c33480c6) (This used to be commit ce222d07ba73b34894454e4fcb43046f0f22c0e7)
Diffstat (limited to 'source3/lib/replace/getifaddrs.m4')
-rw-r--r--source3/lib/replace/getifaddrs.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/replace/getifaddrs.m4 b/source3/lib/replace/getifaddrs.m4
index 7e6016ed8f..85f08ee6c3 100644
--- a/source3/lib/replace/getifaddrs.m4
+++ b/source3/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([