Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions ext/standard/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,6 @@ dnl Check for arc4random on BSD systems
dnl
AC_CHECK_DECLS([arc4random_buf])

dnl
dnl Check for getrandom on newer Linux kernels
dnl
AC_CHECK_DECLS([getrandom])

dnl
dnl Check for argon2
dnl
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
}
#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001))
arc4random_buf(bytes, size);
#elif HAVE_DECL_GETRANDOM
#elif defined(__linux__) && defined(SYS_getrandom)
/* Linux getrandom(2) syscall */
size_t read_bytes = 0;
size_t amount_to_read = 0;
Expand Down