mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.3'
This commit is contained in:
commit
445ea01edf
2 changed files with 7 additions and 2 deletions
|
@ -12,6 +12,11 @@ AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h],,, [dnl
|
|||
#include <CommonCrypto/CommonCryptoError.h>
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Mostly for non Linux systems
|
||||
dnl
|
||||
AC_CHECK_FUNCS([getrandom])
|
||||
|
||||
dnl
|
||||
dnl Setup extension
|
||||
dnl
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# if (defined(__FreeBSD__) && __FreeBSD_version > 1200000) || (defined(__DragonFly__) && __DragonFly_version >= 500700) || \
|
||||
defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) || defined(__midipix__)
|
||||
(defined(__sun) && defined(HAVE_GETRANDOM)) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) || defined(__midipix__)
|
||||
# include <sys/random.h>
|
||||
# endif
|
||||
#endif
|
||||
|
@ -100,7 +100,7 @@ ZEND_ATTRIBUTE_NONNULL PHPAPI zend_result php_random_bytes_ex(void *bytes, size_
|
|||
#else
|
||||
size_t read_bytes = 0;
|
||||
# if (defined(__linux__) && defined(SYS_getrandom)) || (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || (defined(__DragonFly__) && __DragonFly_version >= 500700) || \
|
||||
defined(__sun) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) || defined(__midipix__)
|
||||
(defined(__sun) && defined(HAVE_GETRANDOM)) || (defined(__NetBSD__) && __NetBSD_Version__ >= 1000000000) || defined(__midipix__)
|
||||
/* Linux getrandom(2) syscall or FreeBSD/DragonFlyBSD/NetBSD getrandom(2) function
|
||||
* Being a syscall, implemented in the kernel, getrandom offers higher quality output
|
||||
* compared to the arc4random api albeit a fallback to /dev/urandom is considered.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue