QRandomGenerator: find getentropy() on macOS
It's in <sys/random.h>. The header exists on Linux and on FreeBSD and declares getrandom(), which we don't use, so it's harmless. Pick-to: 6.3 Change-Id: Ibf4acec0f166495998f7fffd16d69005ab59df3b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
d581778251
commit
96a025c28b
@ -243,6 +243,9 @@ qt_config_compile_test(getentropy
|
||||
LABEL "getentropy()"
|
||||
CODE
|
||||
"#include <unistd.h>
|
||||
#if __has_include(<sys/random.h>)
|
||||
# include <sys/random.h>
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
@ -53,7 +53,9 @@
|
||||
# include <sys/auxv.h>
|
||||
#endif
|
||||
|
||||
#if !QT_CONFIG(getentropy) && (!defined(Q_OS_BSD4) || defined(__GLIBC__)) && !defined(Q_OS_WIN)
|
||||
#if QT_CONFIG(getentropy) && __has_include(<sys/random.h>)
|
||||
# include <sys/random.h>
|
||||
#elif !QT_CONFIG(getentropy) && (!defined(Q_OS_BSD4) || defined(__GLIBC__)) && !defined(Q_OS_WIN)
|
||||
# include "qdeadlinetimer.h"
|
||||
# include "qhashfunctions.h"
|
||||
#endif // !QT_CONFIG(getentropy)
|
||||
|
Loading…
Reference in New Issue
Block a user