Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix dynamically linked zlib version #51007

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
} ],
[ 'node_shared_zlib=="false"', {
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
'defines': [ 'NODE_BUNDLED_ZLIB' ],
'conditions': [
[ 'force_load=="true"', {
'xcode_settings': {
Expand Down
9 changes: 9 additions & 0 deletions src/node_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
#include "uv.h"
#include "uvwasi.h"
#include "v8.h"

#ifdef NODE_BUNDLED_ZLIB
#include "zlib_version.h"
#else
#include <zlib.h>
#endif // NODE_BUNDLED_ZLIB

#if HAVE_OPENSSL
#include <openssl/opensslv.h>
Expand Down Expand Up @@ -79,7 +84,11 @@ Metadata::Versions::Versions() {
node = NODE_VERSION_STRING;
v8 = v8::V8::GetVersion();
uv = uv_version_string();
#ifdef NODE_BUNDLED_ZLIB
zlib = ZLIB_VERSION;
#else
zlib = zlibVersion();
#endif // NODE_BUNDLED_ZLIB
ares = ARES_VERSION_STR;
modules = NODE_STRINGIFY(NODE_MODULE_VERSION);
nghttp2 = NGHTTP2_VERSION;
Expand Down
Loading