From 71b8801b61463209134a4d7b7e6ebcb7a3fc5623 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 20 Jan 2024 21:43:06 +0100 Subject: [PATCH] Fix bd85f61a: [Linux] don't include sys/random.h on older glibc systems (#11844) --- src/core/random_func.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index 0a18360953..dfbd2311fe 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -24,10 +24,12 @@ #if defined(_WIN32) # include # include +#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) +// No includes required. +#elif defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 25))) +# include #elif defined(__EMSCRIPTEN__) # include -#elif !defined(__APPLE__) && !defined(__NetBSD__) && !defined(__FreeBSD__) -# include #endif #include "../safeguards.h"