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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
  • Loading branch information
bradleythughes authored and evanlucas committed Oct 14, 2016
1 parent 7922830 commit c457b92
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 @@ -480,6 +480,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 c457b92

Please sign in to comment.