]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fix build with libressl
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 6 Apr 2022 19:54:25 +0000 (21:54 +0200)
committerFlole998 <Flole998@users.noreply.github.com>
Wed, 6 Apr 2022 21:28:11 +0000 (23:28 +0200)
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@gmail.com>
src/http.c
src/utils.c

index 06d5e7617212259091ea9c9aec1249c2b7058158..72a498317cf612a0d5ec6020968a3efa59289687 100644 (file)
@@ -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",
index d8ffe4ad5c339229c6365158bee30888e78eefb8..eecb10e11621671cf88475a4453a58312a65e858 100644 (file)
@@ -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;