From: Dustin L. Howett Date: Mon, 1 Jun 2026 17:38:07 +0000 (-0400) Subject: 7zip: only fall back to 7Z_ZSTD if we can actually use zstd X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49f67a344e7ff8bb41e5b6bf029e1a9c3a10120d;p=thirdparty%2Flibarchive.git 7zip: only fall back to 7Z_ZSTD if we can actually use zstd Without this fix, the 7zip writer will fall back to zstd (when it is the last available option) even if it could not be linked, then fail at runtime with an unexpected error message. --- diff --git a/libarchive/archive_write_set_format_7zip.c b/libarchive/archive_write_set_format_7zip.c index f3f861059..80d4ba0da 100644 --- a/libarchive/archive_write_set_format_7zip.c +++ b/libarchive/archive_write_set_format_7zip.c @@ -379,7 +379,7 @@ archive_write_set_format_7zip(struct archive *_a) zip->opt_compression = _7Z_BZIP2; #elif defined(HAVE_ZLIB_H) zip->opt_compression = _7Z_DEFLATE; -#elif HAVE_ZSTD_H +#elif HAVE_ZSTD_H && HAVE_ZSTD_compressStream zip->opt_compression = _7Z_ZSTD; #else zip->opt_compression = _7Z_COPY;