diff options
author | Leigh <leigh@php.net> | 2015-12-23 21:54:15 +0000 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2017-01-09 23:29:07 +0100 |
commit | 14c72cc5824d5fa472b79b7216a01be0918ccc5d (patch) | |
tree | ba8fafbecc3e32d1936e702cde7bf3ce729e6182 /ext/standard/random.c | |
parent | 9ad34131909f02c774f55dc06f647027bd9d7abb (diff) | |
download | php-git-14c72cc5824d5fa472b79b7216a01be0918ccc5d.tar.gz |
Fix check for linux getrandom syscall
Diffstat (limited to 'ext/standard/random.c')
-rw-r--r-- | ext/standard/random.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/random.c b/ext/standard/random.c index b5197753c8..6d314c559e 100644 --- a/ext/standard/random.c +++ b/ext/standard/random.c @@ -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; |