Skip to content

Commit

Permalink
src: add HAVE_OPENSSL directive to openssl_config
Browse files Browse the repository at this point in the history
Currently when building with the following configuration options:
$ ./configure --without-ssl && make

The following link error is reported:

Undefined symbols for architecture x86_64:
  "node::openssl_config", referenced from:
      node::Init(int*, char const**, int*, char const***) in node.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Adding an HAVE_OPENSSL directive around this code allows the build to
pass.

PR-URL: nodejs#11618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
  • Loading branch information
danbev committed May 30, 2017
1 parent 3f6199c commit 6ecb1cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4311,8 +4311,10 @@ void Init(int* argc,
SafeGetenv("NODE_PRESERVE_SYMLINKS", &text) && text[0] == '1';
}

#if HAVE_OPENSSL
if (openssl_config.empty())
SafeGetenv("OPENSSL_CONF", &openssl_config);
#endif

#if !defined(NODE_WITHOUT_NODE_OPTIONS)
std::string node_options;
Expand Down

0 comments on commit 6ecb1cb

Please sign in to comment.