ext/random: haiku supports arc4random api too.

close GH-16095
This commit is contained in:
David Carlier 2024-09-28 13:05:54 +00:00
parent f1c4736f67
commit d00dd2b4b5
No known key found for this signature in database
GPG Key ID: 8486F847B4B94EF1
2 changed files with 4 additions and 1 deletions

3
NEWS
View File

@ -5,4 +5,7 @@ PHP NEWS
- PDO_PGSQL:
. Added Iterable support for PDO::pgsqlCopyFromArray. (KentarouTakeda)
- Random:
. Moves from /dev/urandom usage to arc4random_buf on Haiku. (David Carlier)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

View File

@ -86,7 +86,7 @@ ZEND_ATTRIBUTE_NONNULL PHPAPI zend_result php_random_bytes_ex(void *bytes, size_
return FAILURE;
}
#elif defined(HAVE_ARC4RANDOM_BUF) && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 && __NetBSD_Version__ < 1000000000) || \
defined(__APPLE__))
defined(__APPLE__) || defined(__HAIKU__))
/*
* OpenBSD until there is a valid equivalent
* or NetBSD before the 10.x release