openbsd-ports/net/neon/patches/patch-src_ne_openssl_c
2017-06-17 13:23:32 +00:00

36 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_ne_openssl_c,v 1.5 2017/06/17 13:23:32 jasper Exp $
Fix linking with libressl
https://git.alpinelinux.org/cgit/aports/tree/main/neon/fix-libressl.patch
Index: src/ne_openssl.c
--- src/ne_openssl.c.orig
+++ src/ne_openssl.c
@@ -66,7 +66,7 @@ typedef unsigned char ne_d2i_uchar;
typedef const unsigned char ne_d2i_uchar;
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
#define X509_up_ref(x) x->references++
#define EVP_PKEY_up_ref(x) x->references++
#define EVP_PKEY_get0_RSA(evp) (evp->pkey.rsa)
@@ -1199,7 +1199,7 @@ static void thread_lock_neon(int mode, int n, const ch
int ne__ssl_init(void)
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
CRYPTO_malloc_init();
SSL_load_error_strings();
SSL_library_init();
@@ -1242,7 +1242,7 @@ int ne__ssl_init(void)
"for %" NE_FMT_SIZE_T " locks.\n", num_locks);
}
#endif
-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */
return 0;
}