Skip to content

Commit 8344161

Browse files
bnoordhuisjasnell
authored andcommitted
build: fix --without-ssl compile time error
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: nodejs/node-v0.x-archive#8645 PR-URL: #3825 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f0453ca commit 8344161

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/node.cc

+4
Original file line numberDiff line numberDiff line change
@@ -3034,9 +3034,13 @@ static void ParseArgs(int* argc,
30343034
printf("%s\n", NODE_VERSION);
30353035
exit(0);
30363036
} else if (strcmp(arg, "--enable-ssl2") == 0) {
3037+
#if HAVE_OPENSSL
30373038
SSL2_ENABLE = true;
3039+
#endif
30383040
} else if (strcmp(arg, "--enable-ssl3") == 0) {
3041+
#if HAVE_OPENSSL
30393042
SSL3_ENABLE = true;
3043+
#endif
30403044
} else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
30413045
PrintHelp();
30423046
exit(0);

0 commit comments

Comments
 (0)