X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fnet.cpp;h=b168cfbbd018a054ba4f665cdde3345d28c26141;hp=e767fa3f758692666e1c341802161f59bc967ce5;hb=7e5291b97179f68ef76d4eb4e56331462fbd16d7;hpb=19c36daa57b026db0e134396542660b0b5c65c20 diff --git a/src/net.cpp b/src/net.cpp index e767fa3..b168cfb 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1727,8 +1727,12 @@ bool BindListenPort(const CService &addrBind, string& strError) // and enable it by default or not. Try to enable it, if possible. if (addrBind.IsIPv6()) { #ifdef IPV6_V6ONLY +#ifdef WIN32 + setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&nOne, sizeof(int)); +#else setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&nOne, sizeof(int)); #endif +#endif #ifdef WIN32 int nProtLevel = 10 /* PROTECTION_LEVEL_UNRESTRICTED */; int nParameterId = 23 /* IPV6_PROTECTION_LEVEl */;