1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

r3333: added configure tests for ipv6 support

(This used to be commit 9794570c6d0646cc34147bf8128802b181f658f0)
This commit is contained in:
Andrew Tridgell 2004-10-28 21:36:27 +00:00 committed by Gerald (Jerry) Carter
parent 66790e49a2
commit 148f07c94b
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -267,9 +267,11 @@ const struct socket_ops *socket_getops_byname(const char *name, enum socket_type
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();