From 6ecb1cb506c92b704e6c5b41f2dfe09398a4be18 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 28 Feb 2017 20:04:12 +0100 Subject: [PATCH] src: add HAVE_OPENSSL directive to openssl_config 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: https://github.com/nodejs/node/pull/11618 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Sam Roberts --- src/node.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node.cc b/src/node.cc index 8928b676cb2e34..5ba7662f1d4d5b 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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;