From 3bfcd10218f96acfdbbf17a898df07703b73e06d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 26 Nov 2018 10:24:45 +0100 Subject: [PATCH] BUILD: compression: fix build error with DEFAULT_MAXZLIBMEM The tune.maxzlibmem setting was moved with commit 368780334 ("MEDIUM: compression: move the zlib-specific stuff from global.h to compression.c") but the preset value using DEFAULT_MAXZLIBMEM was incorrectly moved : - the field is in "global" and not "global.tune" - the trailing comma instead of semi-colon will make it either zero (threads enabled), break (threads enabled with debugging), or cast the memprintf's return pointer to int (threads disabled) It simply proves that nobody ever used DEFAULT_MAXZLIBMEM since 1.8! This needs to be backported to 1.8. --- src/compression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compression.c b/src/compression.c index e7ce90a1f..3c0cea571 100644 --- a/src/compression.c +++ b/src/compression.c @@ -717,7 +717,7 @@ static void __comp_fetch_init(void) slz_prepare_dist_table(); #endif #if defined(USE_ZLIB) && defined(DEFAULT_MAXZLIBMEM) - global.tune.maxzlibmem = DEFAULT_MAXZLIBMEM * 1024U * 1024U, + global.maxzlibmem = DEFAULT_MAXZLIBMEM * 1024U * 1024U; #endif #ifdef USE_ZLIB HA_SPIN_INIT(&comp_pool_lock);