kumquat-buildroot/package/ace/0002-ACE-ace-SSL-SSL_Asynch_BIO.cpp-fix-build-with-libres.patch
Fabrice Fontaine 4ec39bad80 package/ace: fix build with libressl >= 3.5.0
Fix the following build failure with libressl raised since bump to
version 3.5.2 in commit 8b216927db:

/tmp/instance-17/output-1/build/ace-7.0.6/ace/SSL/SSL_Asynch_BIO.cpp:45:19: error: variable 'BIO_METHOD methods_ACE' has initializer but incomplete type
   45 | static BIO_METHOD methods_ACE =
      |                   ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/7f40d6dde03134238151c248fbbd66e4713546cb

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-03-10 22:01:06 +01:00

57 lines
2.1 KiB
Diff

From 82b139f921ddb549c1bd236030bbc86e314852b3 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 21 Feb 2023 14:20:11 +0100
Subject: [PATCH] ACE/ace/SSL/SSL_Asynch_BIO.cpp: fix build with libressl >=
3.5.0
Fix the following build failure with libressl >= 3.5.0:
/tmp/instance-17/output-1/build/ace-7.0.6/ace/SSL/SSL_Asynch_BIO.cpp:45:19: error: variable 'BIO_METHOD methods_ACE' has initializer but incomplete type
45 | static BIO_METHOD methods_ACE =
| ^~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/7f40d6dde03134238151c248fbbd66e4713546cb
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/DOCGroup/ACE_TAO/pull/2053]
---
ACE/ace/SSL/SSL_Asynch_BIO.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ace/SSL/SSL_Asynch_BIO.cpp b/ace/SSL/SSL_Asynch_BIO.cpp
index 0faa775fc0..5543598873 100644
--- a/ace/SSL/SSL_Asynch_BIO.cpp
+++ b/ace/SSL/SSL_Asynch_BIO.cpp
@@ -41,7 +41,8 @@ extern "C"
#define BIO_TYPE_ACE ( 21 | BIO_TYPE_SOURCE_SINK )
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
static BIO_METHOD methods_ACE =
{
BIO_TYPE_ACE, // BIO_TYPE_PROXY_SERVER,
@@ -68,14 +69,15 @@ static BIO_METHOD methods_ACE =
#else
static BIO_METHOD* methods_ACE;
# define BIO_set_num(b, val)
-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L) */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
BIO *
ACE_SSL_make_BIO (void * ssl_asynch_stream)
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
BIO * const pBIO = BIO_new (&methods_ACE);
#else
if (!methods_ACE)
--
2.39.0