svn commit: samba r3333 - in branches/SAMBA_4_0/source/lib/socket: .
tridge at samba.org
tridge at samba.org
Thu Oct 28 21:36:27 GMT 2004
Author: tridge
Date: 2004-10-28 21:36:27 +0000 (Thu, 28 Oct 2004)
New Revision: 3333
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3333
Log:
added configure tests for ipv6 support
Modified:
branches/SAMBA_4_0/source/lib/socket/config.m4
branches/SAMBA_4_0/source/lib/socket/socket.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/socket/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/socket/config.m4 2004-10-28 21:24:29 UTC (rev 3332)
+++ branches/SAMBA_4_0/source/lib/socket/config.m4 2004-10-28 21:36:27 UTC (rev 3333)
@@ -1,6 +1,11 @@
SMB_MODULE_MK(socket_ipv4,SOCKET,STATIC,lib/socket/config.mk)
-SMB_MODULE_MK(socket_ipv6,SOCKET,STATIC,lib/socket/config.mk)
SMB_MODULE_MK(socket_unix,SOCKET,STATIC,lib/socket/config.mk)
+AC_CHECK_FUNCS(gethostbyname2, have_ipv6=true, have_ipv6=false)
+if $have_ipv6 = true; then
+ AC_DEFINE(HAVE_SOCKET_IPV6,1,[Whether the system has ipv6 support])
+ SMB_MODULE_MK(socket_ipv6,SOCKET,STATIC,lib/socket/config.mk)
+fi
+
SMB_SUBSYSTEM_MK(SOCKET,lib/socket/config.mk)
Modified: branches/SAMBA_4_0/source/lib/socket/socket.c
===================================================================
--- branches/SAMBA_4_0/source/lib/socket/socket.c 2004-10-28 21:24:29 UTC (rev 3332)
+++ branches/SAMBA_4_0/source/lib/socket/socket.c 2004-10-28 21:36:27 UTC (rev 3333)
@@ -267,9 +267,11 @@
return socket_ipv4_ops();
}
+#if HAVE_SOCKET_IPV6
if (strcmp("ipv6", name) == 0) {
return socket_ipv6_ops();
}
+#endif
if (strcmp("unix", name) == 0) {
return socket_unixdom_ops();
More information about the samba-cvs
mailing list