diff --git a/include/wolfssl/openssl/opensslv.h b/include/wolfssl/openssl/opensslv.h index f68b6cafb3..911c4b5eed 100644 --- a/include/wolfssl/openssl/opensslv.h +++ b/include/wolfssl/openssl/opensslv.h @@ -34,7 +34,10 @@ defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x0090810fL) ||\ defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x10100000L) ||\ defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x10001040L) - /* valid version */ + /* valid version */ +#elif defined(OPENSSL_VERSION_NUMBER) + /* unrecognized version, but continue. */ + #define WOLFSSL_OPENSSL_VERSION_NUMBER_UNRECOGNIZED #elif defined(WOLFSSL_APACHE_HTTPD) || defined(HAVE_LIBEST) || \ defined(WOLFSSL_BIND) || defined(WOLFSSL_NGINX) || \ defined(WOLFSSL_RSYSLOG) || defined(WOLFSSL_KRB) || defined(HAVE_STUNNEL) || \ @@ -55,11 +58,15 @@ #define OPENSSL_VERSION_NUMBER 0x0090810fL #endif -#define OPENSSL_VERSION_TEXT "wolfSSL " LIBWOLFSSL_VERSION_STRING -#define OPENSSL_VERSION 0 +#ifndef OPENSSL_VERSION_TEXT + #define OPENSSL_VERSION_TEXT "wolfSSL " LIBWOLFSSL_VERSION_STRING +#endif +#ifndef OPENSSL_VERSION + #define OPENSSL_VERSION 0 +#endif #ifndef OPENSSL_IS_WOLFSSL -#define OPENSSL_IS_WOLFSSL + #define OPENSSL_IS_WOLFSSL #endif #endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */ diff --git a/libatalk/ssl/src/bio.c b/libatalk/ssl/src/bio.c index 340cbfdac9..ca93bca1c7 100644 --- a/libatalk/ssl/src/bio.c +++ b/libatalk/ssl/src/bio.c @@ -24,10 +24,9 @@ #endif #include -#if defined(OPENSSL_EXTRA) && !defined(_WIN32) +#if defined(OPENSSL_EXTRA) && !defined(_WIN32) && !defined(_GNU_SOURCE) /* turn on GNU extensions for XVASPRINTF with wolfSSL_BIO_printf */ - #undef _GNU_SOURCE - #define _GNU_SOURCE + #define _GNU_SOURCE 1 #endif #if !defined(WOLFSSL_BIO_INCLUDED) diff --git a/libatalk/ssl/src/ssl.c b/libatalk/ssl/src/ssl.c index 9ba891d629..c2ab9b8879 100644 --- a/libatalk/ssl/src/ssl.c +++ b/libatalk/ssl/src/ssl.c @@ -25,10 +25,9 @@ #endif #include -#if defined(OPENSSL_EXTRA) && !defined(_WIN32) +#if defined(OPENSSL_EXTRA) && !defined(_WIN32) && !defined(_GNU_SOURCE) /* turn on GNU extensions for XISASCII */ - #undef _GNU_SOURCE - #define _GNU_SOURCE + #define _GNU_SOURCE 1 #endif #if !defined(WOLFCRYPT_ONLY) || defined(OPENSSL_EXTRA) || \