Skip to content

Commit

Permalink
tests: fix zstd long option test for 32-bit architectures
Browse files Browse the repository at this point in the history
Fixes #1968
  • Loading branch information
mmatuska committed Sep 12, 2023
1 parent c871193 commit 3bd918d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libarchive/test/test_write_filter_zstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bd918d

Please sign in to comment.