summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2023-01-15 19:12:05 +0100
committerDaniel Black <daniel@mariadb.org>2023-02-08 16:07:52 +1100
commitdd5b648cc35040f6bf15840b9893641b9a60c7cb (patch)
tree66c86eb03ef1cb36c6b718e085cd9b1faa483ef7
parent17423c6c515032fd474d0154dcdc52ddda73e5c7 (diff)
downloadmariadb-git-bb-10.4-danielblack-pr2435-libressl.tar.gz
include/ssl_compat.h: fix build with libressl >= 3.5.0bb-10.4-danielblack-pr2435-libressl
Fix the following build failure with libressl >= 3.5.0: In file included from /tmp/instance-10/output-1/build/mariadb-10.3.36/vio/viosslfactories.c:18: /tmp/instance-10/output-1/build/mariadb-10.3.36/vio/viosslfactories.c: In function 'get_dh2048': /tmp/instance-10/output-1/build/mariadb-10.3.36/include/ssl_compat.h:68:45: error: invalid use of incomplete typedef 'DH' {aka 'struct dh_st'} 68 | #define DH_set0_pqg(D,P,Q,G) ((D)->p= (P), (D)->g= (G)) | ^~ Fixes: - http://autobuild.buildroot.org/results/524198344aafca58d214537af64c5961c407b0f8 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r--include/ssl_compat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ssl_compat.h b/include/ssl_compat.h
index 8dc1225407e..9541a68cbdc 100644
--- a/include/ssl_compat.h
+++ b/include/ssl_compat.h
@@ -19,7 +19,8 @@
/* OpenSSL version specific definitions */
#if defined(OPENSSL_VERSION_NUMBER)
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
+ !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
#define HAVE_OPENSSL11 1
#define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION)
#define ERR_remove_state(X) ERR_clear_error()