package/nodejs: bump 0.12.x branch to version 0.12.9
[buildroot-gz.git] / package / nodejs / 0.12.9 / 0004-src-fix-build-error-without-OpenSSL-support.patch
blob62966eb1d3d060312da821b9ef290d64b3e5aba0
1 From ba6142dbaebe06738686da150043abbd1ef1fbf5 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Tue, 8 Dec 2015 21:22:45 +0100
4 Subject: [PATCH] src: fix build error without OpenSSL support
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 PR #3890 [1] introduced the variable ALLOW_INSECURE_SERVER_DHPARAM defined
10 in src/node_crypto.cc. However, if nodejs is built without OpenSSL support,
11 the build fails:
12 error: ‘ALLOW_INSECURE_SERVER_DHPARAM’ was not declared in this scope
13 ALLOW_INSECURE_SERVER_DHPARAM = true;
15 Fix this by using the preprocessor macro HAVE_OPENSSL to opt-out the use of
16 ALLOW_INSECURE_SERVER_DHPARAM in non-OpenSSL builds.
18 Patch status: Sent upstream [2]
20 [1] https://github.com/nodejs/node/pull/3890
21 [2] https://github.com/nodejs/node/pull/4201
23 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
24 ---
25 src/node.cc | 2 ++
26 1 file changed, 2 insertions(+)
28 diff --git a/src/node.cc b/src/node.cc
29 index 1da8328..e5239ac 100644
30 --- a/src/node.cc
31 +++ b/src/node.cc
32 @@ -3042,7 +3042,9 @@ static void ParseArgs(int* argc,
33 SSL3_ENABLE = true;
34 #endif
35 } else if (strcmp(arg, "--allow-insecure-server-dhparam") == 0) {
36 +#if HAVE_OPENSSL
37 ALLOW_INSECURE_SERVER_DHPARAM = true;
38 +#endif
39 } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
40 PrintHelp();
41 exit(0);
42 --
43 2.6.3