diff --git a/common-src/glib-util.c b/common-src/glib-util.c index cbd8642..1ab1261 100644 --- a/common-src/glib-util.c +++ b/common-src/glib-util.c @@ -40,7 +40,8 @@ #if (defined HAVE_LIBCURL && defined LIBCURL_USE_OPENSSL) || defined SSL_SECURITY #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if (defined OPENSSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER < 0x10100000L) \ + || defined LIBRESSL_VERSION_NUMBER static GMutex **openssl_mutex_array; static void openssl_lock_callback(int mode, int type, const char *file, int line) { @@ -58,7 +59,8 @@ static void openssl_lock_callback(int mode, int type, const char *file, int line static void init_openssl(void) { -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if (defined OPENSSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER < 0x10100000L) \ + || defined LIBRESSL_VERSION_NUMBER int i; openssl_mutex_array = g_new0(GMutex *, CRYPTO_num_locks());