summary refs log tree commit diff
path: root/pkgs/development/libraries/webkitgtk/PR-157554.patch
diff options
context:
space:
mode:
authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>2017-04-10 23:11:16 -0700
committerHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>2017-04-10 23:11:16 -0700
commitda1d13bc0791e9effccd697792e745346ba00a45 (patch)
tree763e48a46d7918178202fd25e8dbfdbcd53d163b /pkgs/development/libraries/webkitgtk/PR-157554.patch
parent5d5c0d590f35934bab23aadc2e1d8d6b6b2118b0 (diff)
downloadnixpkgs-da1d13bc0791e9effccd697792e745346ba00a45.tar
nixpkgs-da1d13bc0791e9effccd697792e745346ba00a45.tar.gz
nixpkgs-da1d13bc0791e9effccd697792e745346ba00a45.tar.bz2
nixpkgs-da1d13bc0791e9effccd697792e745346ba00a45.tar.lz
nixpkgs-da1d13bc0791e9effccd697792e745346ba00a45.tar.xz
nixpkgs-da1d13bc0791e9effccd697792e745346ba00a45.tar.zst
nixpkgs-da1d13bc0791e9effccd697792e745346ba00a45.zip
webkgitgtk: fix 2.14 on macOS
Includes the patches from macports and fixes an issue with the
`otool -L` output that was causing g-ir-scanner to fail.
The paths in the macports patches have been modified so that they
will work with `patches` in nix (an extra directory level was
added).
Diffstat (limited to 'pkgs/development/libraries/webkitgtk/PR-157554.patch')
-rw-r--r--pkgs/development/libraries/webkitgtk/PR-157554.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/libraries/webkitgtk/PR-157554.patch b/pkgs/development/libraries/webkitgtk/PR-157554.patch
new file mode 100644
index 00000000000..615e805c92c
--- /dev/null
+++ b/pkgs/development/libraries/webkitgtk/PR-157554.patch
@@ -0,0 +1,33 @@
+https://bugs.webkit.org/show_bug.cgi?id=157554
+
+--- a/Source/WTF/wtf/OSRandomSource.cpp
++++ b/Source/WTF/wtf/OSRandomSource.cpp
+@@ -29,7 +29,7 @@
+ #include <stdint.h>
+ #include <stdlib.h>
+ 
+-#if !OS(DARWIN) && OS(UNIX)
++#if OS(UNIX) && !(OS(DARWIN) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -46,7 +46,7 @@
+ 
+ namespace WTF {
+ 
+-#if !OS(DARWIN) && OS(UNIX)
++#if OS(UNIX) && !(OS(DARWIN) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
+ NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToOpenURandom()
+ {
+     CRASH();
+@@ -60,8 +56,8 @@ NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToReadFromURandom()
+     
+ void cryptographicallyRandomValuesFromOS(unsigned char* buffer, size_t length)
+ {
+-#if OS(DARWIN)
+-    RELEASE_ASSERT(!CCRandomCopyBytes(kCCRandomDefault, buffer, length));
++#if OS(DARWIN) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
++    return arc4random_buf(buffer, length);
+ #elif OS(UNIX)
+     int fd = open("/dev/urandom", O_RDONLY, 0);
+     if (fd < 0)