Skip to content

Commit

Permalink
Only define BOOST_ASIO_DISABLE_IOCP on Windows XP
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vultraz authored and GregoryLundberg committed Nov 30, 2017
1 parent f58e0af commit 913f012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/network_asio.hpp
Expand Up @@ -16,7 +16,9 @@

#ifdef _WIN32

#if _WIN32_WINNT == _WIN32_WINNT_WINXP
#define BOOST_ASIO_DISABLE_IOCP
#endif

#ifdef INADDR_ANY
#undef INADDR_ANY
Expand Down
2 changes: 2 additions & 0 deletions src/wesnothd_connection.hpp
Expand Up @@ -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
Expand Down

0 comments on commit 913f012

Please sign in to comment.