diff options
author | Jack Lloyd <[email protected]> | 2017-12-30 12:32:27 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-30 12:32:27 -0500 |
commit | cd6e777c32333248329edc3312408aa6eecae512 (patch) | |
tree | 47caf025e3bfa8c25e96af2e67dbf6789ee628c3 /src/lib/utils | |
parent | b97460499a8c6bb5faaf32c331d89c5d2d42b323 (diff) |
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.
Diffstat (limited to 'src/lib/utils')
-rw-r--r-- | src/lib/utils/socket/socket.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 <errno.h> #include <fcntl.h> -#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 <winsock2.h> #include <ws2tcpip.h> @@ -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<OS::Socket>(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<OS::Socket>(new BSD_Socket(hostname, service, timeout)); #else |