From b048049dad7eedd9a5d97f0b34016cade94f9efe Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 14 Nov 2015 15:50:44 +0100 Subject: [PATCH] build: fix --without-ssl compile time error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following build error by putting #if guards around the variables: ../src/node.cc: In function 'void node::ParseArgs(int*, const char**, int*, const char***, int*, const char***)': ../src/node.cc:3037:7: error: 'SSL2_ENABLE' was not declared in this scope SSL2_ENABLE = true; ^ ../src/node.cc:3039:7: error: 'SSL3_ENABLE' was not declared in this scope SSL3_ENABLE = true; Fixes: https://github.com/nodejs/node-v0.x-archive/issues/8645 PR-URL: https://github.com/nodejs/node/pull/3825 Reviewed-By: Colin Ihrig Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- src/node.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node.cc b/src/node.cc index 624865b55669..978d3fd477a6 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3034,9 +3034,13 @@ static void ParseArgs(int* argc, printf("%s\n", NODE_VERSION); exit(0); } else if (strcmp(arg, "--enable-ssl2") == 0) { +#if HAVE_OPENSSL SSL2_ENABLE = true; +#endif } else if (strcmp(arg, "--enable-ssl3") == 0) { +#if HAVE_OPENSSL SSL3_ENABLE = true; +#endif } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { PrintHelp(); exit(0);