From f626a2dd310c75337949d077207a42d8f355082a Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Thu, 16 Nov 2017 17:25:22 +1100 Subject: [PATCH] Only define BOOST_ASIO_DISABLE_IOCP on Windows XP That define allows boost::asio::ip::tcp::socket::cancel to work on Windows XP, but there's no reason to have it enabled on other Windows versions. --- src/network_asio.hpp | 2 ++ src/wesnothd_connection.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/network_asio.hpp b/src/network_asio.hpp index 3be8bfb9f04b..6686e357ddff 100644 --- a/src/network_asio.hpp +++ b/src/network_asio.hpp @@ -16,7 +16,9 @@ #ifdef _WIN32 +#if _WIN32_WINNT == _WIN32_WINNT_WINXP #define BOOST_ASIO_DISABLE_IOCP +#endif #ifdef INADDR_ANY #undef INADDR_ANY diff --git a/src/wesnothd_connection.hpp b/src/wesnothd_connection.hpp index b42aba6472ae..bddd5720a45b 100644 --- a/src/wesnothd_connection.hpp +++ b/src/wesnothd_connection.hpp @@ -20,7 +20,9 @@ // gethostbyname in socket_ops.ipp. This define silences that. #define _WINSOCK_DEPRECATED_NO_WARNINGS +#if _WIN32_WINNT == _WIN32_WINNT_WINXP #define BOOST_ASIO_DISABLE_IOCP +#endif #ifdef INADDR_ANY #undef INADDR_ANY