From c457b928d08b4714334de93ff7c3a9857c8c26f4 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 13 Oct 2016 07:38:38 +0000 Subject: [PATCH] build: add -DZLIB_CONST when building with --shared-zlib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 782620f added the define only when building with the bundled zlib. Using a shared zlib results in build breakage: ../src/inspector_agent.cc:179:16: error: assigning to 'Bytef *' (aka 'unsigned char *') from incompatible type 'const uint8_t *' (aka 'const unsigned char *') strm.next_in = PROTOCOL_JSON + 3; ^ ~~~~~~~~~~~~~~~~~ 1 error generated. PR-URL: https://github.com/nodejs/node/pull/9077 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Myles Borins Reviewed-By: Johan Bergström Reviewed-By: Michael Dawson Reviewed-By: Evan Lucas --- node.gyp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node.gyp b/node.gyp index fa98547e09b198..d799ba11b77689 100644 --- a/node.gyp +++ b/node.gyp @@ -480,6 +480,8 @@ }], [ 'node_shared_zlib=="false"', { 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ], + }, { + 'defines': [ 'ZLIB_CONST' ], }], [ 'node_shared_http_parser=="false"', {