Skip to content

Commit aab3f78

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
2 parents 61af3ed + 14c72cc commit aab3f78

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

ext/standard/config.m4

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,6 @@ dnl Check for arc4random on BSD systems
546546
dnl
547547
AC_CHECK_DECLS([arc4random_buf])
548548

549-
dnl
550-
dnl Check for getrandom on newer Linux kernels
551-
dnl
552-
AC_CHECK_DECLS([getrandom])
553-
554549
dnl
555550
dnl Setup extension sources
556551
dnl

ext/standard/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
9393
}
9494
#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001))
9595
arc4random_buf(bytes, size);
96-
#elif HAVE_DECL_GETRANDOM
96+
#elif defined(__linux__) && defined(SYS_getrandom)
9797
/* Linux getrandom(2) syscall */
9898
size_t read_bytes = 0;
9999
size_t amount_to_read = 0;

0 commit comments

Comments
 (0)