forked from NetBSD/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nodejs: Work around getentropy issue on SunOS.
Noticed by Stefan Husch in #203.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
lang/nodejs/patches/patch-deps_openssl_openssl_crypto_rand_rand__unix.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |