diff --git a/ext/standard/random.c b/ext/standard/random.c index 4543b1ac497..526347f5658 100644 --- a/ext/standard/random.c +++ b/ext/standard/random.c @@ -94,7 +94,7 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw) } return FAILURE; } -#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001)) +#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001) || defined(__APPLE__)) arc4random_buf(bytes, size); #else size_t read_bytes = 0;