summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch20
-rw-r--r--dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild1
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch b/dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch
new file mode 100644
index 000000000000..6153f1840b97
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch
@@ -0,0 +1,20 @@
+https://dev.gnupg.org/T6442
+
+Patch as suggested by Werned in https://dev.gnupg.org/T6442#169396
+
+--- a/random/rndgetentropy.c
++++ b/random/rndgetentropy.c
+@@ -94,8 +94,13 @@
+ * and might not be applicable on other FIPS modules not running
+ * RHEL kernel.
+ */
++#ifdef GRND_RANDOM
+ nbytes = length < 32 ? length : 32;
+ ret = getrandom (buffer, nbytes, GRND_RANDOM);
++#else
++ ret = -1;
++ gpg_err_set_errno (ENOSYS);
++#endif
+ }
+ else
+ {
diff --git a/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild b/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild
index 3bc1ef525b06..41cdeeafe307 100644
--- a/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild
+++ b/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild
@@ -45,6 +45,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-multilib-syspath.patch
"${FILESDIR}"/${PN}-powerpc-darwin.patch
"${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
+ "${FILESDIR}"/${P}-darwin.patch # upstream T6442
)
MULTILIB_CHOST_TOOLS=(