]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: compression: don't allocate DEFAULT_MAXZLIBMEM without USE_ZLIB
authorWilly Tarreau <w@1wt.eu>
Thu, 26 Nov 2015 15:34:56 +0000 (16:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Nov 2015 15:35:53 +0000 (16:35 +0100)
It's pointless to reserve this amount of memory when zlib is not used.
Adding the condition will make build scripts easier to manage. This may
be backported to 1.6.

src/haproxy.c

index 973af29182265b1ccfafe57d1a5a616185770e31..6e75f72c559923ddc893cb539316bf10c12c0650 100644 (file)
@@ -134,7 +134,7 @@ struct global global = {
        .nbproc = 1,
        .req_count = 0,
        .logsrvs = LIST_HEAD_INIT(global.logsrvs),
-#ifdef DEFAULT_MAXZLIBMEM
+#if defined(USE_ZLIB) && defined(DEFAULT_MAXZLIBMEM)
        .maxzlibmem = DEFAULT_MAXZLIBMEM * 1024U * 1024U,
 #else
        .maxzlibmem = 0,