summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-08-25 08:54:38 +0100
committerTomas Mraz <tomas@openssl.org>2021-08-27 08:51:05 +0200
commitc023d98dcf2ba1cc30f545ae54d0e037e80a8794 (patch)
tree496eb7a7105c90f41e317f677aaf26866cc9307d /providers
parent6f242d224cd1f5d9f4d9b3a1722cca93b92d25b0 (diff)
Darwin platform allows to build on releases before Yosemite/ios 8.
backport #16409 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16418)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/rands/seeding/rand_unix.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c
index 5048383077..750afca58e 100644
--- a/providers/implementations/rands/seeding/rand_unix.c
+++ b/providers/implementations/rands/seeding/rand_unix.c
@@ -40,10 +40,6 @@
# include <sys/param.h>
# include <sys/random.h>
#endif
-#if defined(__APPLE__)
-# include <CommonCrypto/CommonCryptoError.h>
-# include <CommonCrypto/CommonRandom.h>
-#endif
#if (defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_SYS_VXWORKS)) \
|| defined(__DJGPP__)
@@ -370,7 +366,7 @@ static ssize_t syscall_random(void *buf, size_t buflen)
if (errno != ENOSYS)
return -1;
}
-# elif defined(__APPLE__)
+# elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
return (ssize_t)buflen;