summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2019-07-02 17:09:25 +0000
committerjperkin <jperkin@pkgsrc.org>2019-07-02 17:09:25 +0000
commit00200570c509ed0630612b3aafa3ea643f387bb7 (patch)
treeb63780cead64b7d586c246200d8063dd5d2d71ad /lang
parente846d13e8e81b475fa5b58f48ff5ffc2ecb634ef (diff)
downloadpkgsrc-00200570c509ed0630612b3aafa3ea643f387bb7.tar.gz
nodejs: Work around getentropy issue on SunOS.
Noticed by Stefan Husch in joyent/pkgsrc#203.
Diffstat (limited to 'lang')
-rw-r--r--lang/nodejs/distinfo3
-rw-r--r--lang/nodejs/patches/patch-deps_openssl_openssl_crypto_rand_rand__unix.c16
2 files changed, 18 insertions, 1 deletions
diff --git a/lang/nodejs/distinfo b/lang/nodejs/distinfo
index 45690005f34..d922ffe4a4e 100644
--- a/lang/nodejs/distinfo
+++ b/lang/nodejs/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.149 2019/05/31 20:52:00 adam Exp $
+$NetBSD: distinfo,v 1.150 2019/07/02 17:09:25 jperkin Exp $
SHA1 (node-v10.16.0.tar.gz) = 7e228646ef32c7eb4e509c220201366d6e86cc36
RMD160 (node-v10.16.0.tar.gz) = 7a5610db052012bff785a16a522703c458f725d5
@@ -18,6 +18,7 @@ SHA1 (patch-deps_openssl_openssl-cl__no__asm.gypi) = 73368f336dbe500e45f0ba6bbb7
SHA1 (patch-deps_openssl_openssl__asm.gypi) = b85e1f5a9f862d469afcb36ff6e1ad202bea704a
SHA1 (patch-deps_openssl_openssl__no__asm.gypi) = b549ea34f51e26669a41a64da0db10e92f0d0a99
SHA1 (patch-deps_openssl_openssl_crypto_init.c) = e544fb218fd927a6d7097df3718c145750198555
+SHA1 (patch-deps_openssl_openssl_crypto_rand_rand__unix.c) = ba8d4602c3386801ad8d3c33c757c69ad3d25a34
SHA1 (patch-deps_uv_common.gypi) = d38a9c8d9e3522f15812aec2f5b1e1e636d4bab3
SHA1 (patch-deps_uv_src_unix_netbsd.c) = 76b27ae86aa80582554ee824146ee7c42c33883b
SHA1 (patch-deps_v8_src_arm_assembler-arm-inl.h) = 56a5d6539d31e19673ef61cc91f003109c69dc29
diff --git a/lang/nodejs/patches/patch-deps_openssl_openssl_crypto_rand_rand__unix.c b/lang/nodejs/patches/patch-deps_openssl_openssl_crypto_rand_rand__unix.c
new file mode 100644
index 00000000000..df22e099429
--- /dev/null
+++ b/lang/nodejs/patches/patch-deps_openssl_openssl_crypto_rand_rand__unix.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-deps_openssl_openssl_crypto_rand_rand__unix.c,v 1.1 2019/07/02 17:09:25 jperkin Exp $
+
+Don't try to automatically call getentropy(3C) on SunOS, it fails if
+built on a platform that doesn't have it.
+
+--- deps/openssl/openssl/crypto/rand/rand_unix.c.orig 2019-05-28 21:32:16.000000000 +0000
++++ deps/openssl/openssl/crypto/rand/rand_unix.c
+@@ -301,7 +301,7 @@ static ssize_t syscall_random(void *buf,
+ * - Linux since 3.17 with glibc 2.25
+ * - FreeBSD since 12.0 (1200061)
+ */
+-# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux)
++# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux) && !defined(__sun)
+ extern int getentropy(void *buffer, size_t length) __attribute__((weak));
+
+ if (getentropy != NULL)