aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-13 17:57:31 -0500
committerJack Lloyd <[email protected]>2017-12-30 14:15:51 -0500
commit092114e11c27de26a53aefa08547cc0bc44717ca (patch)
tree38b26479b272cd6fa60deb2b995f0d116087b331 /src/cli
parent2d3cee8b02a1823ef05eedbbd3e435131460635a (diff)
Test OS features by the feature vs the OS name
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/socket_utils.h4
-rw-r--r--src/cli/tls_client.cpp2
-rw-r--r--src/cli/tls_server.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/cli/socket_utils.h b/src/cli/socket_utils.h
index a8e2a51a6..d7eb4382e 100644
--- a/src/cli/socket_utils.h
+++ b/src/cli/socket_utils.h
@@ -11,7 +11,7 @@
#include <botan/build.h>
#include "cli_exceptions.h"
-#if defined(BOTAN_TARGET_OS_IS_WINDOWS)
+#if defined(BOTAN_TARGET_OS_HAS_WINSOCK2)
#include <winsock2.h>
#include <WS2tcpip.h>
@@ -57,7 +57,7 @@ inline int send(int s, const uint8_t* buf, size_t len, int flags)
return ::send(s, reinterpret_cast<const char*>(buf), static_cast<int>(len), flags);
}
-#else
+#elif defined(BOTAN_TARGET_OS_HAS_POSIX1)
#include <sys/types.h>
#include <sys/time.h>
diff --git a/src/cli/tls_client.cpp b/src/cli/tls_client.cpp
index ddc443614..7a9633fca 100644
--- a/src/cli/tls_client.cpp
+++ b/src/cli/tls_client.cpp
@@ -8,7 +8,7 @@
#include "cli.h"
-#if defined(BOTAN_HAS_TLS) && defined(BOTAN_TARGET_OS_HAS_SOCKETS)
+#if defined(BOTAN_HAS_TLS) && (defined(BOTAN_TARGET_OS_HAS_SOCKETS) || defined(BOTAN_TARGET_OS_HAS_WINSOCK2))
#include <botan/tls_client.h>
#include <botan/tls_policy.h>
diff --git a/src/cli/tls_server.cpp b/src/cli/tls_server.cpp
index 44c69bf17..7127b2020 100644
--- a/src/cli/tls_server.cpp
+++ b/src/cli/tls_server.cpp
@@ -8,7 +8,7 @@
#include "cli.h"
-#if defined(BOTAN_HAS_TLS) && defined(BOTAN_TARGET_OS_HAS_SOCKETS)
+#if defined(BOTAN_HAS_TLS) && (defined(BOTAN_TARGET_OS_HAS_SOCKETS) || defined(BOTAN_TARGET_OS_HAS_WINSOCK2))
#include <botan/tls_server.h>
#include <botan/tls_policy.h>