[Buildroot] [PATCH 1/1] package/netatalk: fix build with libressl

Arnout Vandecappelle arnout at mind.be
Mon Apr 25 20:21:55 UTC 2022



On 23/04/2022 17:33, Fabrice Fontaine wrote:
> Fix the following build failure with libressl >= 2.7.0:
> 
> In file included from uams_dhx_passwd.c:35:
> openssl_compat.h:15:19: error: static declaration of 'DH_set0_pqg' follows non-static declaration
>     15 | inline static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
>        |                   ^~~~~~~~~~~
> In file included from uams_dhx_passwd.c:33:
> /home/autobuild/autobuild/instance-2/output-1/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/openssl/dh.h:195:5: note: previous declaration of 'DH_set0_pqg' was here
>    195 | int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
>        |     ^~~~~~~~~~~
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/fc6e308f346570f8198542602bc8c1bdd0a4869e
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   ..._compat.h-fix-build-with-libressl-2..patch | 43 +++++++++++++++++++
>   1 file changed, 43 insertions(+)
>   create mode 100644 package/netatalk/0002-etc-uams-openssl_compat.h-fix-build-with-libressl-2..patch
> 
> diff --git a/package/netatalk/0002-etc-uams-openssl_compat.h-fix-build-with-libressl-2..patch b/package/netatalk/0002-etc-uams-openssl_compat.h-fix-build-with-libressl-2..patch
> new file mode 100644
> index 0000000000..05913862f6
> --- /dev/null
> +++ b/package/netatalk/0002-etc-uams-openssl_compat.h-fix-build-with-libressl-2..patch
> @@ -0,0 +1,43 @@
> +From 58ddc137021a938f37c3794305a839f8df449d3f Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> +Date: Tue, 5 Apr 2022 23:59:15 +0200
> +Subject: [PATCH] etc/uams/openssl_compat.h: fix build with libressl >= 2.7.0
> +
> +Fix the following build failure with libressl >= 2.7.0 which added
> +DH_set0_pqg with
> +https://github.com/libressl-portable/openbsd/commit/848e2a019c796b685fc8c5848283b86e48fbe0bf:
> +
> +In file included from uams_dhx_passwd.c:35:
> +openssl_compat.h:15:19: error: static declaration of 'DH_set0_pqg' follows non-static declaration
> +   15 | inline static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
> +      |                   ^~~~~~~~~~~
> +In file included from uams_dhx_passwd.c:33:
> +/home/autobuild/autobuild/instance-2/output-1/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/openssl/dh.h:195:5: note: previous declaration of 'DH_set0_pqg' was here
> +  195 | int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
> +      |     ^~~~~~~~~~~
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/fc6e308f346570f8198542602bc8c1bdd0a4869e
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> +[Upstream status: not sent yet]
> +---
> + etc/uams/openssl_compat.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/etc/uams/openssl_compat.h b/etc/uams/openssl_compat.h
> +index ded377bc..5cc8de34 100644
> +--- a/etc/uams/openssl_compat.h
> ++++ b/etc/uams/openssl_compat.h
> +@@ -11,7 +11,7 @@ http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
> + #ifndef OPENSSL_COMPAT_H
> + #define OPENSSL_COMPAT_H
> +
> +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
> ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000L)
> + inline static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
> + {
> +    /* If the fields p and g in d are NULL, the corresponding input
> +--
> +2.35.1
> +



More information about the buildroot mailing list