From 8d7542acad18a2f1be701242d655015263f3147a Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Wed, 5 Dec 2018 16:32:12 +0300 Subject: Do not use arc4random_buf() on GNU/kFreeBSD It is not available in the GNU C Library. Change-Id: I36dc92fca283c126669885b75406c8e57f563ce3 Reviewed-by: Thiago Macieira --- src/corelib/global/qrandom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 03534cf453..6195c324e7 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -48,7 +48,7 @@ #include -#if !QT_CONFIG(getentropy) && !defined(Q_OS_BSD4) && !defined(Q_OS_WIN) +#if !QT_CONFIG(getentropy) && (!defined(Q_OS_BSD4) || defined(__GLIBC__)) && !defined(Q_OS_WIN) # include "qdeadlinetimer.h" # include "qhashfunctions.h" @@ -259,7 +259,7 @@ static void fallback_fill(quint32 *, qsizetype) Q_DECL_NOTHROW // no fallback necessary, getentropy cannot fail under normal circumstances Q_UNREACHABLE(); } -#elif defined(Q_OS_BSD4) +#elif defined(Q_OS_BSD4) && !defined(__GLIBC__) static void fallback_update_seed(unsigned) {} static void fallback_fill(quint32 *ptr, qsizetype left) Q_DECL_NOTHROW { -- cgit v1.2.3