Browse Source

fix invalid conversion error with MinGW 4.8.1 in net.cpp

- fixes src\net.cpp:1601: Error:invalid conversion from 'void*' to
  'const char*' [-fpermissive] in a setsockopt() call on Win32 that was
  found by using MinGW 4.8.1 compiler suite
0.8
Philip Kaufmann 12 years ago committed by Warren Togami
parent
commit
a950202bde
  1. 4
      src/net.cpp

4
src/net.cpp

@ -1732,8 +1732,12 @@ bool BindListenPort(const CService &addrBind, string& strError)
// and enable it by default or not. Try to enable it, if possible. // and enable it by default or not. Try to enable it, if possible.
if (addrBind.IsIPv6()) { if (addrBind.IsIPv6()) {
#ifdef IPV6_V6ONLY #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)); setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&nOne, sizeof(int));
#endif #endif
#endif
#ifdef WIN32 #ifdef WIN32
int nProtLevel = 10 /* PROTECTION_LEVEL_UNRESTRICTED */; int nProtLevel = 10 /* PROTECTION_LEVEL_UNRESTRICTED */;
int nParameterId = 23 /* IPV6_PROTECTION_LEVEl */; int nParameterId = 23 /* IPV6_PROTECTION_LEVEl */;

Loading…
Cancel
Save