Fix bd85f61a: [Linux] don't include sys/random.h on older glibc systems (#11844)

This commit is contained in:
Patric Stout 2024-01-20 21:43:06 +01:00 committed by GitHub
parent fa479c4a7c
commit 71b8801b61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,10 +24,12 @@
#if defined(_WIN32)
# include <windows.h>
# include <bcrypt.h>
#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__)
// No includes required.
#elif defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 25)))
# include <sys/random.h>
#elif defined(__EMSCRIPTEN__)
# include <emscripten.h>
#elif !defined(__APPLE__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
# include <sys/random.h>
#endif
#include "../safeguards.h"