]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Drop support for lz4 < 1.3.0
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 29 Oct 2018 17:32:51 +0000 (18:32 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 29 Oct 2018 20:54:42 +0000 (21:54 +0100)
lz4-r130 was released on May 29th, 2015. Let's drop the work-around for older
versions. In particular, we won't test any new code against those ancient
releases, so we shouldn't pretend they are supported.

README
meson.build
src/journal/compress.c
src/journal/test-compress.c

diff --git a/README b/README
index a3cfcada778fb14ecce63e42bf1b507290635fce..4439be11f034c1b0b0bd03981498b2fa09619766 100644 (file)
--- a/README
+++ b/README
@@ -148,7 +148,7 @@ REQUIREMENTS:
         libacl (optional)
         libselinux (optional)
         liblzma (optional)
-        liblz4 >= 119 (optional)
+        liblz4 >= 1.3.0 / 130 (optional)
         libgcrypt (optional)
         libqrencode (optional)
         libmicrohttpd (optional)
index 3b010215629662608993d5e3ee6d8c0605dff176..a0e0305e022420138571ad0424d0c2d7e954793a 100644 (file)
@@ -1092,6 +1092,7 @@ conf.set10('HAVE_XZ', have)
 want_lz4 = get_option('lz4')
 if want_lz4 != 'false' and not fuzzer_build
         liblz4 = dependency('liblz4',
+                            version : '>= 1.3.0',
                             required : want_lz4 == 'true')
         have = liblz4.found()
 else
index 6baf15c8ffb80da5e055c97453960b1201871b64..a4a5e63840effad7713e8061323b37ae1f410f09 100644 (file)
@@ -95,11 +95,7 @@ int compress_blob_lz4(const void *src, uint64_t src_size,
         if (src_size < 9)
                 return -ENOBUFS;
 
-#if LZ4_VERSION_NUMBER >= 10700
         r = LZ4_compress_default(src, (char*)dst + 8, src_size, (int) dst_alloc_size - 8);
-#else
-        r = LZ4_compress_limitedOutput(src, (char*)dst + 8, src_size, (int) dst_alloc_size - 8);
-#endif
         if (r <= 0)
                 return -ENOBUFS;
 
index 7addf318d69544fe84a207868ebfa762ae3d25b2..63c4bf33058a9761bf632de128c007262de2b005 100644 (file)
@@ -208,11 +208,7 @@ static void test_lz4_decompress_partial(void) {
         memset(huge, 'x', HUGE_SIZE);
         memcpy(huge, "HUGE=", 5);
 
-#if LZ4_VERSION_NUMBER >= 10700
         r = LZ4_compress_default(huge, buf, HUGE_SIZE, buf_size);
-#else
-        r = LZ4_compress_limitedOutput(huge, buf, HUGE_SIZE, buf_size);
-#endif
         assert_se(r >= 0);
         compressed = r;
         log_info("Compressed %i → %zu", HUGE_SIZE, compressed);