diff --git a/CMakeLists.txt b/CMakeLists.txt index 84cd629b7..e65c945e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,7 +135,11 @@ check_symbol_exists(newlocale "locale.h" HAS_NEWLOCALE) option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON) if (ENABLE_IPV6) - check_symbol_exists(in6addr_any "netinet/in.h" HAVE_IPV6) + if (WIN32) + set(HAVE_IPV6 ON) + else() + check_symbol_exists(in6addr_any "netinet/in.h" HAVE_IPV6) + endif() if (NOT HAVE_IPV6) message(SEND_ERROR "IPv6 is not available in your system.") endif() diff --git a/network.c b/network.c index 20f3be1e6..cdedf5e9b 100644 --- a/network.c +++ b/network.c @@ -20,6 +20,7 @@ #include #ifdef _WIN32 +#include #include #include #else