git: 59e28f1603b3 - main - databases/freetds: Fix build with libressl 3.5
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Nov 2022 10:31:15 UTC
The branch main has been updated by zirias: URL: https://cgit.FreeBSD.org/ports/commit/?id=59e28f1603b39daa7ebe4ad909bbd3146927a004 commit 59e28f1603b39daa7ebe4ad909bbd3146927a004 Author: Felix Palmen <zirias@FreeBSD.org> AuthorDate: 2022-10-17 11:45:38 +0000 Commit: Felix Palmen <zirias@FreeBSD.org> CommitDate: 2022-11-01 10:30:35 +0000 databases/freetds: Fix build with libressl 3.5 Approved by: bofh (maintainer), tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D37052 --- .../files/patch-src_tds_sec__negotiate__openssl.h | 14 ---------- databases/freetds/files/patch-src_tds_tls.c | 32 ++++++++++++---------- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/databases/freetds/files/patch-src_tds_sec__negotiate__openssl.h b/databases/freetds/files/patch-src_tds_sec__negotiate__openssl.h deleted file mode 100644 index 301e80834bf7..000000000000 --- a/databases/freetds/files/patch-src_tds_sec__negotiate__openssl.h +++ /dev/null @@ -1,14 +0,0 @@ ---- src/tds/sec_negotiate_openssl.h.orig 2017-02-15 09:00:01 UTC -+++ src/tds/sec_negotiate_openssl.h -@@ -37,6 +37,11 @@ - #error HAVE_OPENSSL not defines, this file should not be included - #endif - -+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL -+#undef OPENSSL_VERSION_NUMBER -+#define OPENSSL_VERSION_NUMBER 0x1000107fL -+#endif -+ - static inline const BIGNUM* - rsa_get_n(const RSA *rsa) - { diff --git a/databases/freetds/files/patch-src_tds_tls.c b/databases/freetds/files/patch-src_tds_tls.c index 028370fc1025..7fb0c8912abb 100644 --- a/databases/freetds/files/patch-src_tds_tls.c +++ b/databases/freetds/files/patch-src_tds_tls.c @@ -11,19 +11,21 @@ #include <freetds/tds.h> #include <freetds/utils/string.h> #include <freetds/tls.h> -@@ -74,6 +78,15 @@ - #define SSL_PUSH_ARGS gnutls_transport_ptr_t ptr, const void *data, size_t len - #define SSL_PTR ptr - #else -+ -+#ifdef LIBRESSL_VERSION_NUMBER -+#if LIBRESSL_VERSION_NUMBER < 0x2070000FL -+static pthread_mutex_t *openssllocks; -+#undef OPENSSL_VERSION_NUMBER -+#define OPENSSL_VERSION_NUMBER 0x1000107fL -+#endif -+#define TLS_ST_OK SSL_ST_OK -+#endif +@@ -600,7 +604,7 @@ tds_ssl_free(BIO *a) + return 1; + } + +-#if OPENSSL_VERSION_NUMBER < 0x1010000FL || defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x1010000FL + static BIO_METHOD tds_method_login[1] = { + { + BIO_TYPE_MEM, +@@ -664,7 +668,7 @@ tds_deinit_openssl_methods(void) + # endif + #endif + +-#if OPENSSL_VERSION_NUMBER < 0x1010000FL || defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x1010000FL + static tds_mutex *openssl_locks; - /* some compatibility layer */ - #if !HAVE_BIO_GET_DATA + static void