All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libevent: fix build with libressl >= 3.5.0
@ 2022-04-26 17:34 Fabrice Fontaine
  2022-04-27 19:34 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-04-26 17:34 UTC (permalink / raw)
  To: buildroot; +Cc: Pierre-Jean Texier, Fabrice Fontaine

Fix the following build failure with libressl raised since bump to
version 3.5.2 in commit 8b216927db080b38fdbf1f8b025b6f90a89d4bc2:

In file included from bufferevent_openssl.c:68:
bufferevent_openssl.c: In function 'bio_bufferevent_free':
openssl-compat.h:44:28: error: invalid use of incomplete typedef 'BIO' {aka 'struct bio_st'}
   44 | #define BIO_get_init(b) (b)->init
      |                            ^~
bufferevent_openssl.c:124:7: note: in expansion of macro 'BIO_get_init'
  124 |   if (BIO_get_init(b) && BIO_get_data(b))
      |       ^~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/273f9aa354a08ef3af6140b8dec086408bf5d574

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...define-BIO_get_init-for-LibreSSL-3-5.patch | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch

diff --git a/package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch b/package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch
new file mode 100644
index 0000000000..33c349b11d
--- /dev/null
+++ b/package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch
@@ -0,0 +1,29 @@
+From 883630f76cbf512003b81de25cd96cb75c6cf0f9 Mon Sep 17 00:00:00 2001
+From: Theo Buehler <tb@openbsd.org>
+Date: Sun, 21 Nov 2021 21:38:20 +0100
+Subject: [PATCH] Don't define BIO_get_init() for LibreSSL 3.5+
+
+BIO_get_init() is available in LibreSSL 3.5 and later. The BIO type
+will become opaque, so the existing macro will break the build.
+
+[Retrieved from:
+https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ openssl-compat.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/openssl-compat.h b/openssl-compat.h
+index a23e34251b..f5de25539f 100644
+--- a/openssl-compat.h
++++ b/openssl-compat.h
+@@ -40,7 +40,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+ #endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ 	(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
+ 
+-#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L && \
++	LIBRESSL_VERSION_NUMBER < 0x30500000L
+ #define BIO_get_init(b) (b)->init
+ #endif
+ 
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libevent: fix build with libressl >= 3.5.0
  2022-04-26 17:34 [Buildroot] [PATCH 1/1] package/libevent: fix build with libressl >= 3.5.0 Fabrice Fontaine
@ 2022-04-27 19:34 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2022-04-27 19:34 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot; +Cc: Pierre-Jean Texier



On 26/04/2022 19:34, Fabrice Fontaine wrote:
> Fix the following build failure with libressl raised since bump to
> version 3.5.2 in commit 8b216927db080b38fdbf1f8b025b6f90a89d4bc2:
> 
> In file included from bufferevent_openssl.c:68:
> bufferevent_openssl.c: In function 'bio_bufferevent_free':
> openssl-compat.h:44:28: error: invalid use of incomplete typedef 'BIO' {aka 'struct bio_st'}
>     44 | #define BIO_get_init(b) (b)->init
>        |                            ^~
> bufferevent_openssl.c:124:7: note: in expansion of macro 'BIO_get_init'
>    124 |   if (BIO_get_init(b) && BIO_get_data(b))
>        |       ^~~~~~~~~~~~
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/273f9aa354a08ef3af6140b8dec086408bf5d574
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   ...define-BIO_get_init-for-LibreSSL-3-5.patch | 29 +++++++++++++++++++
>   1 file changed, 29 insertions(+)
>   create mode 100644 package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch
> 
> diff --git a/package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch b/package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch
> new file mode 100644
> index 0000000000..33c349b11d
> --- /dev/null
> +++ b/package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch
> @@ -0,0 +1,29 @@
> +From 883630f76cbf512003b81de25cd96cb75c6cf0f9 Mon Sep 17 00:00:00 2001
> +From: Theo Buehler <tb@openbsd.org>
> +Date: Sun, 21 Nov 2021 21:38:20 +0100
> +Subject: [PATCH] Don't define BIO_get_init() for LibreSSL 3.5+
> +
> +BIO_get_init() is available in LibreSSL 3.5 and later. The BIO type
> +will become opaque, so the existing macro will break the build.
> +
> +[Retrieved from:
> +https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + openssl-compat.h | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/openssl-compat.h b/openssl-compat.h
> +index a23e34251b..f5de25539f 100644
> +--- a/openssl-compat.h
> ++++ b/openssl-compat.h
> +@@ -40,7 +40,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
> + #endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
> + 	(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
> +
> +-#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
> ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L && \
> ++	LIBRESSL_VERSION_NUMBER < 0x30500000L
> + #define BIO_get_init(b) (b)->init
> + #endif
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-27 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 17:34 [Buildroot] [PATCH 1/1] package/libevent: fix build with libressl >= 3.5.0 Fabrice Fontaine
2022-04-27 19:34 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.