From: Michael Tremer Date: Tue, 4 Feb 2025 10:57:10 +0000 (+0000) Subject: compress: Enable long mode (if available) X-Git-Tag: 0.9.30~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1041bb38b399060822f078cf5c5fae2abd13275;p=pakfire.git compress: Enable long mode (if available) Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/compress.c b/src/pakfire/compress.c index 99fa8ece..f7b4e447 100644 --- a/src/pakfire/compress.c +++ b/src/pakfire/compress.c @@ -980,6 +980,16 @@ int pakfire_compress_create_archive(struct pakfire* pakfire, struct archive** ar } } +#if ARCHIVE_VERSION_NUMBER >= 3007002 + // Enable long mode (supported from libarchive >= 3.7.2) + r = archive_write_set_filter_option(a, NULL, "long", "31"); + if (r) { + ERROR(ctx, "Failed to enable Zstandard long mode: %s\n", + archive_error_string(a)); + goto ERROR; + } +#endif /* ARCHIVE_VERSION_NUMBER >= 3007002 */ + #if ARCHIVE_VERSION_NUMBER >= 3006000 // Fetch numbers of processors long processors = sysconf(_SC_NPROCESSORS_ONLN);