diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2018-12-05 16:32:12 +0300 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2018-12-09 18:19:59 +0000 |
commit | 8d7542acad18a2f1be701242d655015263f3147a (patch) | |
tree | 734704fb76060d83b0af0144700144be17d749b2 /src/corelib | |
parent | d36a4fc19709e6047fe846b36731b59909218b6d (diff) |
Do not use arc4random_buf() on GNU/kFreeBSD
It is not available in the GNU C Library.
Change-Id: I36dc92fca283c126669885b75406c8e57f563ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qrandom.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 <errno.h> -#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 { |