mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
Make Win32NetState compatible with MSVC
This commit is contained in:
parent
a199084c99
commit
231c02c058
@ -29,7 +29,11 @@ void SubscribeToEvents()
|
|||||||
if (SUCCEEDED(Result))
|
if (SUCCEEDED(Result))
|
||||||
{
|
{
|
||||||
VARIANT_BOOL IsConnect = VARIANT_FALSE;
|
VARIANT_BOOL IsConnect = VARIANT_FALSE;
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
Result = pNetworkListManager->get_IsConnectedToInternet(&IsConnect);
|
||||||
|
#else
|
||||||
Result = pNetworkListManager->IsConnectedToInternet(&IsConnect);
|
Result = pNetworkListManager->IsConnectedToInternet(&IsConnect);
|
||||||
|
#endif
|
||||||
if (SUCCEEDED(Result)) {
|
if (SUCCEEDED(Result)) {
|
||||||
i2p::transport::transports.SetOnline (true);
|
i2p::transport::transports.SetOnline (true);
|
||||||
LogPrint(eLogInfo, "NetState: Current state: ", IsConnect == VARIANT_TRUE ? "connected" : "disconnected");
|
LogPrint(eLogInfo, "NetState: Current state: ", IsConnect == VARIANT_TRUE ? "connected" : "disconnected");
|
||||||
|
@ -140,8 +140,8 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_definitions(-DWINVER=0x0501)
|
add_definitions(-DWINVER=0x0600)
|
||||||
add_definitions(-D_WIN32_WINNT=0x0501)
|
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wno-unused-parameter -Wno-uninitialized")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wno-unused-parameter -Wno-uninitialized")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pedantic")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pedantic")
|
||||||
|
Loading…
Reference in New Issue
Block a user