]> git.ipfire.org Git - pakfire.git/commitdiff
compress: Enable long mode (if available)
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2025 10:57:10 +0000 (10:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2025 11:13:09 +0000 (11:13 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/compress.c

index 99fa8eced83ca4b04f1a177492851fb85d5ac90e..f7b4e447ca42705a878f5f293ad86b95a99893f5 100644 (file)
@@ -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);