]> git.ipfire.org Git - thirdparty/zstd.git/commit
test: fix versionsTest build for old zstd versions no_legacy 4554/head
authorYann Collet <cyan@meta.com>
Thu, 18 Dec 2025 23:36:07 +0000 (15:36 -0800)
committerYann Collet <cyan@fb.com>
Fri, 19 Dec 2025 00:13:53 +0000 (16:13 -0800)
commit1dae4f0188daff25cfef78de72627e7299a01b86
tree688739c09c48e5436a8b37132218810103d79dea
parenta87d0cc476e4947ccaa5531734f7afd1c49ef766
test: fix versionsTest build for old zstd versions

Summary:
Some old zstd versions (notably v0.6.x) have a bug in fileio.c where header includes check for `ZSTD_LEGACY_SUPPORT==1` but code usage checks for `ZSTD_LEGACY_SUPPORT>=1`. Using value 5 causes compilation failure because headers aren't included but the code tries to use legacy functions.

Changing to `ZSTD_LEGACY_SUPPORT=1` for old version builds fixes the compilation while still enabling legacy format support.

Test Plan:
Run `make versionsTest` or `python3 tests/test-zstd-versions.py` to verify all old versions compile and cross-version decompression works correctly.
tests/test-zstd-versions.py