From: Juho Vähä-Herttua Date: Tue, 22 Apr 2014 17:16:50 +0000 (+0300) Subject: IPV6_V6ONLY set by default on win32 X-Git-Tag: upstream/0.9.0~4^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=64d59e3087f829006d091fa0d114efb50972a2bf;p=deb_shairplay.git IPV6_V6ONLY set by default on win32 --- diff --git a/src/lib/netutils.c b/src/lib/netutils.c index 180d32e..3fc8838 100644 --- a/src/lib/netutils.c +++ b/src/lib/netutils.c @@ -78,9 +78,11 @@ netutils_init_socket(unsigned short *port, int use_ipv6, int use_udp) sin6ptr->sin6_addr = in6addr_any; sin6ptr->sin6_port = htons(*port); +#ifndef WIN32 /* Make sure we only listen to IPv6 addresses */ setsockopt(server_fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &v6only, sizeof(v6only)); +#endif socklen = sizeof(*sin6ptr); ret = bind(server_fd, (struct sockaddr *)sin6ptr, socklen);