From: Martin Matuska Date: Tue, 12 Sep 2023 06:54:47 +0000 (+0200) Subject: tests: fix zstd long option test for 32-bit architectures X-Git-Tag: v3.7.3~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bd918d92f8c34ba12de9c6604d96f9e262a59fc;p=thirdparty%2Flibarchive.git tests: fix zstd long option test for 32-bit architectures Fixes #1968 --- diff --git a/libarchive/test/test_write_filter_zstd.c b/libarchive/test/test_write_filter_zstd.c index 3cdbd812a..c9731f1b6 100644 --- a/libarchive/test/test_write_filter_zstd.c +++ b/libarchive/test/test_write_filter_zstd.c @@ -161,8 +161,12 @@ DEFINE_TEST(test_write_filter_zstd) archive_write_set_filter_option(a, NULL, "max-frame-size", "1048576")); #endif #if ZSTD_VERSION_NUMBER >= MINVER_LONG - assertEqualIntA(a, ARCHIVE_OK, - archive_write_set_filter_option(a, NULL, "long", "27")); + if ((int)(sizeof(size_t) == 4)) + assertEqualIntA(a, ARCHIVE_OK, + archive_write_set_filter_option(a, NULL, "long", "26")); + else + assertEqualIntA(a, ARCHIVE_OK, + archive_write_set_filter_option(a, NULL, "long", "27")); assertEqualIntA(a, ARCHIVE_FAILED, archive_write_set_filter_option(a, NULL, "long", "-1")); /* negative */ #endif