From ddd4f22e33a7d5d9835f129a6cd0af9c175d76a4 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 18 Mar 2020 22:30:17 +0100 Subject: Fix build of lz4 compressor with older versions of liblz4 Older versions of liblz4 don't define LZ4HC_CLEVEL_MAX. This commit adds a definition if liblz4 doesn't provide one. Signed-off-by: David Oberhollenzer --- lib/sqfs/comp/lz4.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sqfs/comp/lz4.c b/lib/sqfs/comp/lz4.c index 4791746..090ec50 100644 --- a/lib/sqfs/comp/lz4.c +++ b/lib/sqfs/comp/lz4.c @@ -29,6 +29,11 @@ typedef struct { #define LZ4LEGACY 1 +/* old verions of liblz4 don't have this */ +#ifndef LZ4HC_CLEVEL_MAX +#define LZ4HC_CLEVEL_MAX 12 +#endif + static int lz4_write_options(sqfs_compressor_t *base, sqfs_file_t *file) { lz4_compressor_t *lz4 = (lz4_compressor_t *)base; -- cgit v1.2.3