diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-12-10 13:52:49 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-12-10 13:52:49 -0500 |
commit | 691b90d4652be373502da3ef6f4d4e2abab6a988 (patch) | |
tree | e542951b2440470618bb1eaa7d1b42f0ce7606ca | |
parent | 4f8b86e307ca88d842d1d57f38a89efd95fd74d2 (diff) |
journal: fix warning about LZ4_compress_limitedOutput
-rw-r--r-- | src/journal/compress.c | 4 |
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; |