aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Pronchery <pierre@freebsdfoundation.org>2023-06-01 18:17:10 +0000
committerMartin Matuska <mm@FreeBSD.org>2024-05-04 11:53:07 +0000
commitd2291dbb3ccbb772fdeb9fdae88602771564e607 (patch)
treeff29c0c0c2cd39d3835d393a88e60a0657d3b295
parent9377240725d2d04dbbfa4758828982d25782c923 (diff)
libarchive: Avoid a build failure with OpenSSL 3.0
This is a minimal workaround; a proper fix will come via a future update from upstream. Sponsored by: The FreeBSD Foundation (cherry picked from commit e23d45187b287ee7a5c49c8b993daa9e6bb3ad97)
-rw-r--r--contrib/libarchive/libarchive/archive_hmac.c2
-rw-r--r--lib/libarchive/Makefile.inc1
2 files changed, 2 insertions, 1 deletions
diff --git a/contrib/libarchive/libarchive/archive_hmac.c b/contrib/libarchive/libarchive/archive_hmac.c
index 012fe1596211..0914f38e3670 100644
--- a/contrib/libarchive/libarchive/archive_hmac.c
+++ b/contrib/libarchive/libarchive/archive_hmac.c
@@ -238,7 +238,7 @@ __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len)
if (*ctx == NULL)
return -1;
EVP_MAC_free(mac);
- params[0] = OSSL_PARAM_construct_utf8_string("digest", "SHA1", 0);
+ params[0] = OSSL_PARAM_construct_utf8_string("digest", (char *)"SHA1", 0);
params[1] = OSSL_PARAM_construct_end();
EVP_MAC_init(*ctx, key, key_len, params);
#else
diff --git a/lib/libarchive/Makefile.inc b/lib/libarchive/Makefile.inc
index c98249519fa4..95d96df24eef 100644
--- a/lib/libarchive/Makefile.inc
+++ b/lib/libarchive/Makefile.inc
@@ -11,6 +11,7 @@ CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
CFLAGS+= -DWITH_OPENSSL
CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L
LIBADD+= crypto
+CFLAGS.archive_hmac.c+=-Wno-error=cast-qual
.else
LIBADD+= md
.endif