diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-07-13 13:05:04 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-05 09:15:39 +0100 |
commit | 1b350f25a66c6fa4a16ef156a1336bf6458d41a8 (patch) | |
tree | 53cc8c45d8529543122130f9506e4e6b54d8fc51 /src/net.cpp | |
parent | 89c2ea0891a9b0364982cbfdb65e64275906a49c (diff) |
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
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index f40afde20f..156ab6349c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1737,8 +1737,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 */; |