summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-08-24 17:02:57 (GMT)
committerBrad King <brad.king@kitware.com>2021-08-24 17:02:57 (GMT)
commit6287b0214760f792192cfc075c7cf839b540b1de (patch)
tree897721a935664467a9ec01a8ee61c904965344a8 /Utilities/cmlibarchive
parent651ecdddfab8ba38decfa0b91333c8d27523c3ea (diff)
downloadCMake-6287b0214760f792192cfc075c7cf839b540b1de.zip
CMake-6287b0214760f792192cfc075c7cf839b540b1de.tar.gz
CMake-6287b0214760f792192cfc075c7cf839b540b1de.tar.bz2
libarchive: Limit xz compression level to 6 on AIX
Since libarchive commit `aff9809c` (Enable compression level up to 9 for xz, xar, 7zip, 2020-07-26, v3.5.0~19^2), libarchive fails to initialize xz compression on AIX with error Internal error initializing compression library: Cannot allocate memory Revert to the old limit of level 6 on AIX. Issue: #22553
Diffstat (limited to 'Utilities/cmlibarchive')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_add_filter_xz.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_xz.c b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_xz.c
index d3e58ce..00df8da 100644
--- a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_xz.c
+++ b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_xz.c
@@ -384,6 +384,10 @@ archive_compressor_xz_options(struct archive_write_filter *f,
data->compression_level = value[0] - '0';
if (data->compression_level > 9)
data->compression_level = 9;
+#ifdef _AIX
+ if (data->compression_level > 6)
+ data->compression_level = 6;
+#endif
return (ARCHIVE_OK);
} else if (strcmp(key, "threads") == 0) {
char *endptr;