Skip to content

Commit

Permalink
databases/freetds: Fix build with libressl 3.5
Browse files Browse the repository at this point in the history
Approved by:		bofh (maintainer), tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D37052
  • Loading branch information
Zirias committed Nov 1, 2022
1 parent b68905f commit 59e28f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 29 deletions.
14 changes: 0 additions & 14 deletions databases/freetds/files/patch-src_tds_sec__negotiate__openssl.h

This file was deleted.

32 changes: 17 additions & 15 deletions databases/freetds/files/patch-src_tds_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 59e28f1

Please sign in to comment.