From c023d98dcf2ba1cc30f545ae54d0e037e80a8794 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 25 Aug 2021 08:54:38 +0100 Subject: Darwin platform allows to build on releases before Yosemite/ios 8. backport #16409 Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/16418) --- providers/implementations/rands/seeding/rand_unix.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'providers') 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 # include #endif -#if defined(__APPLE__) -# include -# include -#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; -- cgit v1.2.3