gentoo/dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch
Fabian Groffen 89dc479533
dev-libs/libgcrypt-1.10.2: fix compilation on Darwin, #904083
Add patch as suggested on upstream bug to fix compilation on non-Linux.

Closes: https://bugs.gentoo.org/904083
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2023-04-25 16:50:14 +02:00

21 lines
566 B
Diff

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
{