From 60bc47dd875b2e2823355b96fbf31bda8a1f2c9b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 11 Apr 2018 20:27:32 -0400 Subject: [PATCH] library: Port to Haiku. --- library/CMakeLists.txt | 4 ++++ library/entropy_poll.c | 3 ++- library/net_sockets.c | 3 ++- library/timing.c | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 7742c22d2..993244f92 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -95,6 +95,10 @@ if(WIN32) set(libs ${libs} ws2_32) endif(WIN32) +if(HAIKU) + set(libs ${libs} network) +endif(HAIKU) + if(USE_PKCS11_HELPER_LIBRARY) set(libs ${libs} pkcs11-helper) endif(USE_PKCS11_HELPER_LIBRARY) diff --git a/library/entropy_poll.c b/library/entropy_poll.c index 67900c46c..c8cf6be16 100644 --- a/library/entropy_poll.c +++ b/library/entropy_poll.c @@ -44,7 +44,8 @@ #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) #if !defined(unix) && !defined(__unix__) && !defined(__unix) && \ - !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) + !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \ + !defined(__HAIKU__) #error "Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in config.h" #endif diff --git a/library/net_sockets.c b/library/net_sockets.c index f99d339ff..e68b3ef05 100644 --- a/library/net_sockets.c +++ b/library/net_sockets.c @@ -28,7 +28,8 @@ #if defined(MBEDTLS_NET_C) #if !defined(unix) && !defined(__unix__) && !defined(__unix) && \ - !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) + !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \ + !defined(__HAIKU__) #error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h" #endif diff --git a/library/timing.c b/library/timing.c index 6a30e5125..3e8139f1f 100644 --- a/library/timing.c +++ b/library/timing.c @@ -39,7 +39,8 @@ #if !defined(MBEDTLS_TIMING_ALT) #if !defined(unix) && !defined(__unix__) && !defined(__unix) && \ - !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) + !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \ + !defined(__HAIKU__) #error "This module only works on Unix and Windows, see MBEDTLS_TIMING_C in config.h" #endif