mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
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: https://github.com/nodejs/node/pull/51007 Refs: https://github.com/nodejs/node/pull/50910 Refs: https://github.com/nodejs/node/pull/50158 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
parent
d4bcdd89c7
commit
7b3eb311a7
2 changed files with 10 additions and 0 deletions
|
@ -141,6 +141,7 @@
|
|||
} ],
|
||||
[ 'node_shared_zlib=="false"', {
|
||||
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
|
||||
'defines': [ 'NODE_BUNDLED_ZLIB' ],
|
||||
'conditions': [
|
||||
[ 'force_load=="true"', {
|
||||
'xcode_settings': {
|
||||
|
|
|
@ -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>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue