void-packages/srcpkgs/libwebsockets/patches/fix-libressl.patch

25 lines
969 B
Diff

--- lib/ssl.c.orig 2016-05-05 21:56:47.926366544 +0200
+++ lib/ssl.c 2016-05-05 21:56:11.400364869 +0200
@@ -197,7 +197,9 @@ lws_ssl_destroy(struct lws_vhost *vhost)
#if (OPENSSL_VERSION_NUMBER < 0x01000000) || defined(USE_WOLFSSL)
ERR_remove_state(0);
#else
-#if (OPENSSL_VERSION_NUMBER >= 0x10100005L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10100005L) && \
+ !defined(LIBRESSL_VERSION_NUMBER) && \
+ !defined(OPENSSL_IS_BORINGSSL)
ERR_remove_thread_state();
#else
ERR_remove_thread_state(NULL);
@@ -689,7 +691,9 @@ lws_ssl_context_destroy(struct lws_context *context)
#if (OPENSSL_VERSION_NUMBER < 0x01000000) || defined(USE_WOLFSSL)
ERR_remove_state(0);
#else
-#if (OPENSSL_VERSION_NUMBER >= 0x10100005L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10100005L) && \
+ !defined(LIBRESSL_VERSION_NUMBER) && \
+ !defined(OPENSSL_IS_BORINGSSL)
ERR_remove_thread_state();
#else
ERR_remove_thread_state(NULL);