Skip to content

Commit

Permalink
build: add -DZLIB_CONST when building with --shared-zlib
Browse files Browse the repository at this point in the history
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: #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>
  • Loading branch information
bradleythughes authored and evanlucas committed Oct 14, 2016
1 parent 8c4fab0 commit 8d2206f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@
}],
[ 'node_shared_zlib=="false"', {
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
}, {
'defines': [ 'ZLIB_CONST' ],
}],

[ 'node_shared_http_parser=="false"', {
Expand Down

0 comments on commit 8d2206f

Please sign in to comment.