summaryrefslogtreecommitdiff
path: root/lib/sqfs/comp
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-18 22:30:17 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-18 22:30:17 +0100
commitddd4f22e33a7d5d9835f129a6cd0af9c175d76a4 (patch)
tree37a64c47fe735849ad52f122e200a44a5d70d7ee /lib/sqfs/comp
parent1e284734d31e74a32c954f273bacd92c4976456f (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/comp')
-rw-r--r--lib/sqfs/comp/lz4.c5
1 files changed, 5 insertions, 0 deletions
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;