diff --git a/cgi.d b/cgi.d index f0d5e9b..0497eb2 100644 --- a/cgi.d +++ b/cgi.d @@ -6026,7 +6026,7 @@ Socket startListening(string host, ushort port, ref bool tcp, ref void delegate( cloexec(listener); listener.setOption(SocketOptionLevel.SOCKET, SocketOption.REUSEADDR, true); if(address.addressFamily == AddressFamily.INET6) - listener.setOption(SocketOptionLevel.SOCKET, SocketOption.IPV6_V6ONLY, true); + listener.setOption(SocketOptionLevel.IPV6, SocketOption.IPV6_V6ONLY, true); listener.bind(address); cleanup = delegate() { listener.close(); diff --git a/core.d b/core.d index 5d32925..49af24d 100644 --- a/core.d +++ b/core.d @@ -3139,7 +3139,7 @@ class AsyncSocket : AsyncFile { if(address.domain == AF_INET6) { int opt = 1; - setsockopt(handle, SOL_SOCKET, IPV6_V6ONLY, &opt, opt.sizeof); + setsockopt(handle, IPPROTO_IPV6 /*SOL_IPV6*/, IPV6_V6ONLY, &opt, opt.sizeof); } // FIXME: chekc for broadcast