summaryrefslogtreecommitdiff
path: root/src/journal/compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/compress.c')
-rw-r--r--src/journal/compress.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/journal/compress.c b/src/journal/compress.c
index ba734b5561..818a720ba8 100644
--- a/src/journal/compress.c
+++ b/src/journal/compress.c
@@ -112,7 +112,11 @@ 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;