0002-src-add-HAVE_OPENSSL-directive-to-openssl_config.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From bfc6d25318e3bbf3d9c0389b33ad45ae1bc401f0 Mon Sep 17 00:00:00 2001
  2. From: Daniel Bevenius <daniel.bevenius@gmail.com>
  3. Date: Tue, 28 Feb 2017 20:04:12 +0100
  4. Subject: [PATCH] src: add HAVE_OPENSSL directive to openssl_config
  5. Currently when building with the following configuration options:
  6. $ ./configure --without-ssl && make
  7. The following link error is reported:
  8. Undefined symbols for architecture x86_64:
  9. "node::openssl_config", referenced from:
  10. node::Init(int*, char const**, int*, char const***) in node.o
  11. ld: symbol(s) not found for architecture x86_64
  12. clang: error: linker command failed with exit code 1 (use -v to see
  13. invocation)
  14. Adding an HAVE_OPENSSL directive around this code allows the build to
  15. pass.
  16. PR-URL: https://github.com/nodejs/node/pull/11618
  17. Reviewed-By: Anna Henningsen <anna@addaleax.net>
  18. Reviewed-By: James M Snell <jasnell@gmail.com>
  19. Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  20. Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  21. Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
  22. [Martin: patch from https://github.com/nodejs/node/pull/11734]
  23. Signed-off-by: Martin Bark <martin@barkynet.com>
  24. ---
  25. src/node.cc | 2 ++
  26. 1 file changed, 2 insertions(+)
  27. diff --git a/src/node.cc b/src/node.cc
  28. index 35d29bd..68362a7 100644
  29. --- a/src/node.cc
  30. +++ b/src/node.cc
  31. @@ -4203,8 +4203,10 @@ void Init(int* argc,
  32. SafeGetenv("NODE_PRESERVE_SYMLINKS", &text) && text[0] == '1';
  33. }
  34. +#if HAVE_OPENSSL
  35. if (openssl_config.empty())
  36. SafeGetenv("OPENSSL_CONF", &openssl_config);
  37. +#endif
  38. // Parse a few arguments which are specific to Node.
  39. int v8_argc;