Skip to content

Commit d00dd2b

Browse files
committed
ext/random: haiku supports arc4random api too.
close GH-16095
1 parent f1c4736 commit d00dd2b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ PHP NEWS
55
- PDO_PGSQL:
66
. Added Iterable support for PDO::pgsqlCopyFromArray. (KentarouTakeda)
77

8+
- Random:
9+
. Moves from /dev/urandom usage to arc4random_buf on Haiku. (David Carlier)
10+
811
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

ext/random/csprng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ ZEND_ATTRIBUTE_NONNULL PHPAPI zend_result php_random_bytes_ex(void *bytes, size_
8686
return FAILURE;
8787
}
8888
#elif defined(HAVE_ARC4RANDOM_BUF) && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 && __NetBSD_Version__ < 1000000000) || \
89-
defined(__APPLE__))
89+
defined(__APPLE__) || defined(__HAIKU__))
9090
/*
9191
* OpenBSD until there is a valid equivalent
9292
* or NetBSD before the 10.x release

0 commit comments

Comments
 (0)