diff --git a/crypto/rand_extra/rand_test.cc b/crypto/rand_extra/rand_test.cc index 183c4f77..d0a7e40e 100644 --- a/crypto/rand_extra/rand_test.cc +++ b/crypto/rand_extra/rand_test.cc @@ -50,7 +50,8 @@ TEST(RandTest, NotObviouslyBroken) { EXPECT_NE(Bytes(buf2), Bytes(kZeros)); } -#if !defined(OPENSSL_WINDOWS) && !defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) +#if !defined(OPENSSL_WINDOWS) && !defined(OPENSSL_IOS) && \ + !defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) static bool ForkAndRand(bssl::Span out) { int pipefds[2]; if (pipe(pipefds) < 0) { @@ -144,7 +145,8 @@ TEST(RandTest, Fork) { EXPECT_NE(Bytes(buf2), Bytes(kZeros)); EXPECT_NE(Bytes(buf3), Bytes(kZeros)); } -#endif // !OPENSSL_WINDOWS && !BORINGSSL_UNSAFE_DETERMINISTIC_MODE +#endif // !OPENSSL_WINDOWS && !OPENSSL_IOS && + // !BORINGSSL_UNSAFE_DETERMINISTIC_MODE #if defined(OPENSSL_THREADS) static void RunConcurrentRands(size_t num_threads) { diff --git a/include/openssl/base.h b/include/openssl/base.h index e287de73..c0d7a8c5 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h @@ -120,6 +120,9 @@ extern "C" { #if defined(__APPLE__) #define OPENSSL_APPLE +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +#define OPENSSL_IOS +#endif #endif #if defined(_WIN32)