Browse Source

build: add -DZLIB_CONST when building with --shared-zlib

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 <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
v6.x
Bradley T. Hughes 8 years ago
committed by Evan Lucas
parent
commit
8d2206fe41
  1. 2
      node.gyp

2
node.gyp

@ -477,6 +477,8 @@
}],
[ 'node_shared_zlib=="false"', {
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
}, {
'defines': [ 'ZLIB_CONST' ],
}],
[ 'node_shared_http_parser=="false"', {

Loading…
Cancel
Save