Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f90fc83

Browse filesBrowse files
richardlauRafaelGSS
authored andcommitted
src: fix dynamically linked zlib version
Report the version of the dynamically linked zlib if built with `configure --shared-zlib` instead of the hardcoded version that corresponds to the bundled version of zlib in `deps`. PR-URL: #51007 Refs: #50910 Refs: #50158 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 4eedf5e commit f90fc83
Copy full SHA for f90fc83

File tree

Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed
Open diff view settings
Collapse file

‎node.gypi‎

Copy file name to clipboardExpand all lines: node.gypi
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
} ],
142142
[ 'node_shared_zlib=="false"', {
143143
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
144+
'defines': [ 'NODE_BUNDLED_ZLIB' ],
144145
'conditions': [
145146
[ 'force_load=="true"', {
146147
'xcode_settings': {
Collapse file

‎src/node_metadata.cc‎

Copy file name to clipboardExpand all lines: src/node_metadata.cc
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
#include "uv.h"
1616
#include "uvwasi.h"
1717
#include "v8.h"
18+
19+
#ifdef NODE_BUNDLED_ZLIB
1820
#include "zlib_version.h"
21+
#else
22+
#include <zlib.h>
23+
#endif // NODE_BUNDLED_ZLIB
1924

2025
#if HAVE_OPENSSL
2126
#include <openssl/opensslv.h>
@@ -79,7 +84,11 @@ Metadata::Versions::Versions() {
7984
node = NODE_VERSION_STRING;
8085
v8 = v8::V8::GetVersion();
8186
uv = uv_version_string();
87+
#ifdef NODE_BUNDLED_ZLIB
8288
zlib = ZLIB_VERSION;
89+
#else
90+
zlib = zlibVersion();
91+
#endif // NODE_BUNDLED_ZLIB
8392
ares = ARES_VERSION_STR;
8493
modules = NODE_STRINGIFY(NODE_MODULE_VERSION);
8594
nghttp2 = NGHTTP2_VERSION;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.