diff --git a/ChangeLog b/ChangeLog index 5588675..4b077b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 08/27/2016 Oleg Moskalenko Version 4.5.0.5 'dan Eider': - Typos in the text fixed. + - LibreSSL compatibility fixed. 08/20/2016 Oleg Moskalenko Version 4.5.0.4 'dan Eider': diff --git a/src/apps/common/apputils.h b/src/apps/common/apputils.h index 9b6e70f..f2994b5 100644 --- a/src/apps/common/apputils.h +++ b/src/apps/common/apputils.h @@ -39,6 +39,11 @@ #include "ns_turn_msg_defs.h" #include "ns_turn_ioalib.h" +#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) +#undef OPENSSL_VERSION_NUMBER +#define OPENSSL_VERSION_NUMBER 0x1000107FL +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/src/apps/relay/dtls_listener.c b/src/apps/relay/dtls_listener.c index b646ccf..bf19405 100644 --- a/src/apps/relay/dtls_listener.c +++ b/src/apps/relay/dtls_listener.c @@ -39,6 +39,11 @@ #include #include +#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) +#undef OPENSSL_VERSION_NUMBER +#define OPENSSL_VERSION_NUMBER 0x1000107FL +#endif + #include /* #define REQUEST_CLIENT_CERT */ diff --git a/src/apps/relay/mainrelay.c b/src/apps/relay/mainrelay.c index a89d441..7f81638 100644 --- a/src/apps/relay/mainrelay.c +++ b/src/apps/relay/mainrelay.c @@ -30,6 +30,11 @@ #include "mainrelay.h" +#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) +#undef OPENSSL_VERSION_NUMBER +#define OPENSSL_VERSION_NUMBER 0x1000107FL +#endif + ////// TEMPORARY data ////////// static int use_lt_credentials = 0; @@ -1662,7 +1667,7 @@ static void print_features(unsigned long mfn) #endif } - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "OpenSSL compile-time version: %s\n",OPENSSL_VERSION_TEXT); + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "OpenSSL compile-time version: %s (0x%lx)\n",OPENSSL_VERSION_TEXT,OPENSSL_VERSION_NUMBER); TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "\n"); diff --git a/src/apps/relay/ns_ioalib_engine_impl.c b/src/apps/relay/ns_ioalib_engine_impl.c index 060f82e..56ae16c 100644 --- a/src/apps/relay/ns_ioalib_engine_impl.c +++ b/src/apps/relay/ns_ioalib_engine_impl.c @@ -54,6 +54,11 @@ #include TURN_SCTP_INCLUDE #endif +#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) +#undef OPENSSL_VERSION_NUMBER +#define OPENSSL_VERSION_NUMBER 0x1000107FL +#endif + /* Compilation test: #if defined(IP_RECVTTL) #undef IP_RECVTTL diff --git a/src/apps/uclient/mainuclient.c b/src/apps/uclient/mainuclient.c index b074d50..0c3a728 100644 --- a/src/apps/uclient/mainuclient.c +++ b/src/apps/uclient/mainuclient.c @@ -48,6 +48,11 @@ #include #include +#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) +#undef OPENSSL_VERSION_NUMBER +#define OPENSSL_VERSION_NUMBER 0x1000107FL +#endif + /////////////// extern definitions ///////////////////// int clmessage_length=100; diff --git a/src/client/ns_turn_msg.c b/src/client/ns_turn_msg.c index 1c71174..cf90598 100644 --- a/src/client/ns_turn_msg.c +++ b/src/client/ns_turn_msg.c @@ -39,6 +39,11 @@ #include #include +#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) +#undef OPENSSL_VERSION_NUMBER +#define OPENSSL_VERSION_NUMBER 0x1000107FL +#endif + /////////// #include diff --git a/src/ns_turn_defs.h b/src/ns_turn_defs.h index 7ad1d5b..bd02299 100644 --- a/src/ns_turn_defs.h +++ b/src/ns_turn_defs.h @@ -39,6 +39,11 @@ #include #endif +#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) +#undef OPENSSL_VERSION_NUMBER +#define OPENSSL_VERSION_NUMBER 0x1000107FL +#endif + #include #include #include