From cd6e777c32333248329edc3312408aa6eecae512 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 30 Dec 2017 12:32:27 -0500 Subject: Disable sockets on MinGW Everything works ok on i686 when crosscompiled but it seems things are badly broken on x86-64 when compiling on Windows. Rather than fight their broken headers, just disable. No OCSP for you MinGW. --- src/lib/utils/socket/socket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/utils/socket/socket.cpp b/src/lib/utils/socket/socket.cpp index be646269b..1020a2f5d 100644 --- a/src/lib/utils/socket/socket.cpp +++ b/src/lib/utils/socket/socket.cpp @@ -30,7 +30,7 @@ #include #include -#elif defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) +#elif defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) && !defined(BOTAN_TARGET_OS_IS_MINGW) #define NOMINMAX 1 #include #include @@ -136,7 +136,7 @@ class Asio_Socket final : public OS::Socket boost::asio::ip::tcp::socket m_tcp; }; -#elif defined(BOTAN_TARGET_OS_TYPE_IS_UNIX) || defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) +#elif defined(BOTAN_TARGET_OS_TYPE_IS_UNIX) || (defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) && !defined(BOTAN_TARGET_OS_IS_MINGW)) class BSD_Socket final : public OS::Socket { @@ -356,7 +356,7 @@ OS::open_socket(const std::string& hostname, #if defined(BOTAN_HAS_BOOST_ASIO) return std::unique_ptr(new Asio_Socket(hostname, service, timeout)); -#elif defined(BOTAN_TARGET_OS_TYPE_IS_UNIX) || defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) +#elif defined(BOTAN_TARGET_OS_TYPE_IS_UNIX) || (defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) && !defined(BOTAN_TARGET_OS_IS_MINGW)) return std::unique_ptr(new BSD_Socket(hostname, service, timeout)); #else -- cgit v1.2.3