[Buildroot] [PATCH 1/1] package/git-crypt: fix build with libressl >= 3.5.0

Fabrice Fontaine fontaine.fabrice at gmail.com
Sun May 15 09:04:57 UTC 2022


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

crypto-openssl-10.cpp:78:18: error: field 'ctx' has incomplete type 'HMAC_CTX' {aka 'hmac_ctx_st'}
   78 |         HMAC_CTX ctx;
      |                  ^~~

Fixes:
 - http://autobuild.buildroot.org/results/98747d470c2ad59280934e160d24bd3fdad1503c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 .../0001-fix-build-with-libressl-3.5.0.patch  | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 package/git-crypt/0001-fix-build-with-libressl-3.5.0.patch

diff --git a/package/git-crypt/0001-fix-build-with-libressl-3.5.0.patch b/package/git-crypt/0001-fix-build-with-libressl-3.5.0.patch
new file mode 100644
index 0000000000..7daaf9c8fc
--- /dev/null
+++ b/package/git-crypt/0001-fix-build-with-libressl-3.5.0.patch
@@ -0,0 +1,56 @@
+From c21cde9010175e2355df17d4e81fedd6020603f8 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Date: Sat, 14 May 2022 00:03:51 +0200
+Subject: [PATCH] fix build with libressl >= 3.5.0
+
+Fix the following build failure with libressl >= 3.5.0:
+
+crypto-openssl-10.cpp:78:18: error: field 'ctx' has incomplete type 'HMAC_CTX' {aka 'hmac_ctx_st'}
+   78 |         HMAC_CTX ctx;
+      |                  ^~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/98747d470c2ad59280934e160d24bd3fdad1503c
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+[Upstream status: https://github.com/AGWA/git-crypt/pull/249]
+---
+ crypto-openssl-10.cpp | 4 +++-
+ crypto-openssl-11.cpp | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/crypto-openssl-10.cpp b/crypto-openssl-10.cpp
+index f0f2c53..a7a5d52 100644
+--- a/crypto-openssl-10.cpp
++++ b/crypto-openssl-10.cpp
+@@ -29,8 +29,10 @@
+  */
+ 
+ #include <openssl/opensslconf.h>
++#include <openssl/opensslv.h>
+ 
+-#if !defined(OPENSSL_API_COMPAT)
++#if !defined(OPENSSL_API_COMPAT) && \
++	!(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30500000L)
+ 
+ #include "crypto.hpp"
+ #include "key.hpp"
+diff --git a/crypto-openssl-11.cpp b/crypto-openssl-11.cpp
+index adf03bb..32c2483 100644
+--- a/crypto-openssl-11.cpp
++++ b/crypto-openssl-11.cpp
+@@ -29,8 +29,10 @@
+  */
+ 
+ #include <openssl/opensslconf.h>
++#include <openssl/opensslv.h>
+ 
+-#if defined(OPENSSL_API_COMPAT)
++#if defined(OPENSSL_API_COMPAT) || \
++	(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30500000L)
+ 
+ #include "crypto.hpp"
+ #include "key.hpp"
+-- 
+2.35.1
+
-- 
2.35.1




More information about the buildroot mailing list