Commit 7b5be264 authored by neverlord's avatar neverlord

Fix build on MinGW

parent aa72be06
...@@ -140,12 +140,13 @@ if(NOT APPLE AND NOT WIN32) ...@@ -140,12 +140,13 @@ if(NOT APPLE AND NOT WIN32)
endif() endif()
# extra setup steps needed on MinGW # extra setup steps needed on MinGW
if(MINGW) if(MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32") add_definitions(-D_WIN32_WINNT=0x0600)
add_definitions(-DWIN32)
include(GenerateExportHeader) include(GenerateExportHeader)
set(LD_FLAGS "ws2_32 -liphlpapi") set(LD_FLAGS "ws2_32 -liphlpapi")
endif() endif()
# needed by subprojects # needed by subprojects
set(LD_FLAGS ${CMAKE_LD_LIBS}) set(LD_FLAGS ${LD_FLAGS} ${CMAKE_LD_LIBS})
################################################################################ ################################################################################
......
...@@ -154,6 +154,7 @@ std::vector<iface_info> get_mac_addresses() { ...@@ -154,6 +154,7 @@ std::vector<iface_info> get_mac_addresses() {
// windows // windows
#include <ws2tcpip.h>
#include <winsock2.h> #include <winsock2.h>
#include <vector> #include <vector>
#include <string> #include <string>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment