summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-02-23 16:04:27 -0800
committerThiago Macieira <thiago.macieira@intel.com>2022-02-24 12:29:43 -0800
commit96a025c28bf793f0519737c5d61bd77728b14ddf (patch)
tree77618cc988b3d089fdf3de476e396a1267613330 /src/corelib/configure.cmake
parentd581778251c3828bcbfb51013870e7c7383058be (diff)
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>
Diffstat (limited to 'src/corelib/configure.cmake')
-rw-r--r--src/corelib/configure.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index 5e6f5ec12a..82bc03a4fd 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -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)
{