summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-08-24 22:40:14 +0100
committerTomas Mraz <tomas@openssl.org>2021-08-27 08:53:05 +0200
commit96ac8f13f4d0ee96baf5724d9f96c44c34b8606c (patch)
tree5855f915cb33bdb2c3df0d6435774926ea1a70e3 /include
parent15d1ddde5de9d28b671d3f6fe8757f4b87e67821 (diff)
Darwin platform allows to build on releases before Yosemite/ios 8.
issue #16407 #16408 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16409)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/rand.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/crypto/rand.h b/include/crypto/rand.h
index 5350d3a931..674f840fd1 100644
--- a/include/crypto/rand.h
+++ b/include/crypto/rand.h
@@ -20,6 +20,16 @@
# include <openssl/rand.h>
+# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
+# include <Availability.h>
+# if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || \
+ (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
+# define OPENSSL_APPLE_CRYPTO_RANDOM 1
+# include <CommonCrypto/CommonCryptoError.h>
+# include <CommonCrypto/CommonRandom.h>
+# endif
+# endif
+
/* forward declaration */
typedef struct rand_pool_st RAND_POOL;