Skip to content

Commit

Permalink
Fix for invalid conversion issue on Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
Tranz5 committed May 20, 2014
1 parent 04873c8 commit 0023962
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1736,8 +1736,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 */;
Expand Down

0 comments on commit 0023962

Please sign in to comment.