Skip to content

Commit 14f12bf

Browse files
bradleythughesevanlucas
authored andcommitted
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: #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>
1 parent 1d8f068 commit 14f12bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

node.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@
477477
}],
478478
[ 'node_shared_zlib=="false"', {
479479
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
480+
}, {
481+
'defines': [ 'ZLIB_CONST' ],
480482
}],
481483

482484
[ 'node_shared_http_parser=="false"', {

0 commit comments

Comments
 (0)