From: yyyy Date: Sun, 1 Sep 2024 03:26:01 +0000 (+0800) Subject: zip: Fix test failure (#2304) X-Git-Tag: v3.7.5~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b279ba282faf03ebc393073551d78cfa578816a;p=thirdparty%2Flibarchive.git zip: Fix test failure (#2304) Fix `test_write_format_zip_stream` failure when `HAVE_ZLIB_H` is not defined. If `libz` is present, `zip` archives would be compressed by default, which requires `zip_version=20`. Otherwise, the archive is not compressed and only requires `zip_version=10`. I'm building libarchive on a machine not intended for developing, so basicly there's no optional dependencies like `libz` available, guess that's why nobody else has reported this issue. --- diff --git a/libarchive/test/test_write_format_zip_stream.c b/libarchive/test/test_write_format_zip_stream.c index aff6a31ae..6619aa7f3 100644 --- a/libarchive/test/test_write_format_zip_stream.c +++ b/libarchive/test/test_write_format_zip_stream.c @@ -82,6 +82,7 @@ DEFINE_TEST(test_write_format_zip_stream) const char *file_name = "file"; #ifndef HAVE_ZLIB_H + zip_version = 10; zip_compression = 0; #endif