Skip to content

Commit 2aaf57e

Browse files
committed
Merge branch 'PHP-7.1'
2 parents 791b795 + aab3f78 commit 2aaf57e

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
@@ -409,11 +409,6 @@ dnl Check for arc4random on BSD systems
409409
dnl
410410
AC_CHECK_DECLS([arc4random_buf])
411411

412-
dnl
413-
dnl Check for getrandom on newer Linux kernels
414-
dnl
415-
AC_CHECK_DECLS([getrandom])
416-
417412
dnl
418413
dnl Check for argon2
419414
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)