summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2021-04-13 10:10:48 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2021-04-13 10:10:48 +0900
commit0007f889bda884e40459ad86f13b6cd8b14c91df (patch)
tree9312c5303df8ad46d02a48354a9b49cef9e91110 /random
parente8b7f10be275bcedb5fc05ed4837a89bfd605c61 (diff)
downloadlibgcrypt-0007f889bda884e40459ad86f13b6cd8b14c91df.tar.gz
random: Fix for iOS.
* random/rndlinux.c [TARGET_OS_IPHONE]: Don't define HAVE_GETENTROPY. -- GnuPG-bug-id: 5375 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'random')
-rw-r--r--random/rndlinux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/random/rndlinux.c b/random/rndlinux.c
index a7a78906..c20c5d4c 100644
--- a/random/rndlinux.c
+++ b/random/rndlinux.c
@@ -35,10 +35,13 @@
#if defined(__APPLE__) && defined(__MACH__)
#include <Availability.h>
#ifdef __MAC_10_11
+#include <TargetConditionals.h>
+#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0
extern int getentropy (void *buf, size_t buflen) __attribute__ ((weak_import));
#define HAVE_GETENTROPY
#endif
#endif
+#endif
#if defined(__linux__) || !defined(HAVE_GETENTROPY)
#ifdef HAVE_SYSCALL
# include <sys/syscall.h>