[Buildroot] [git commit branch/2022.02.x] package/tvheadend: fix build with libressl

Peter Korsgaard peter at korsgaard.com
Mon Apr 11 21:39:25 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=a4c060c95680b7e7f56c2dba8b0442836ed9d08d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x

Fix the following build failure with libressl:

utils.c:(.text+0x1614): undefined reference to `EVP_sha512_256'

Fixes:
 - http://autobuild.buildroot.org/results/cb18f6533806f3729f9718bdcc719384be375b66

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
(cherry picked from commit 04164b81e76e29fb9482245e808b46af2aa67bc6)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 .../tvheadend/0002-fix-build-with-libressl.patch   | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/package/tvheadend/0002-fix-build-with-libressl.patch b/package/tvheadend/0002-fix-build-with-libressl.patch
new file mode 100644
index 0000000000..c99dacdbeb
--- /dev/null
+++ b/package/tvheadend/0002-fix-build-with-libressl.patch
@@ -0,0 +1,47 @@
+From ea65f8025a9124cd7353b21f167968bdb897306f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Date: Wed, 6 Apr 2022 21:54:25 +0200
+Subject: [PATCH] fix build with libressl
+
+Fix the following build failure with libressl raised since
+https://github.com/tvheadend/tvheadend/commit/e61acb8ad4a3411f4e7acfd8133d222299f6d47e:
+
+utils.c:(.text+0x1614): undefined reference to `EVP_sha512_256'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/cb18f6533806f3729f9718bdcc719384be375b66
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+[Retrieved from:
+https://github.com/tvheadend/tvheadend/commit/ea65f8025a9124cd7353b21f167968bdb897306f]
+---
+ src/http.c  | 2 +-
+ src/utils.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/http.c b/src/http.c
+index 06d5e76172..72a498317c 100644
+--- a/src/http.c
++++ b/src/http.c
+@@ -412,7 +412,7 @@ http_send_header(http_connection_t *hc, int rc, const char *content,
+         http_auth_header(&hdrs, realm,
+                          config.http_auth_algo == HTTP_AUTH_ALGO_SHA256 ?
+                            "SHA-256" :
+-#if OPENSSL_VERSION_NUMBER >= 0x1010101fL
++#if OPENSSL_VERSION_NUMBER >= 0x1010101fL && !defined(LIBRESSL_VERSION_NUMBER)
+                              "SHA-512-256",
+ #else
+                              "SHA-256",
+diff --git a/src/utils.c b/src/utils.c
+index d8ffe4ad5c..eecb10e116 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -616,7 +616,7 @@ sha256sum ( const char *str, int lowercase )
+ char *
+ sha512sum256 ( const char *str, int lowercase )
+ {
+-#if OPENSSL_VERSION_NUMBER >= 0x1010101fL
++#if OPENSSL_VERSION_NUMBER >= 0x1010101fL && !defined(LIBRESSL_VERSION_NUMBER)
+   return openssl_hash_hexstr(str, lowercase, EVP_sha512_256(), 32);
+ #else
+   return NULL;



More information about the buildroot mailing list