Do not use getrandom for glibc < 2.25
Some checks failed
C/C++ CI Linux / ubuntu-24.04-arm (push) Has been cancelled
C/C++ CI Linux / ubuntu-latest (push) Has been cancelled
C/C++ CI MacOS / macos-15 (push) Has been cancelled
C/C++ CI Windows / windows-2022 (push) Has been cancelled
C/C++ CI cmake / macos-15 (push) Has been cancelled
C/C++ CI cmake / ubuntu-24.04-arm (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (push) Has been cancelled
C/C++ CI cmake / windows-2022 (push) Has been cancelled

This commit is contained in:
Vladimir Dubrovin 2026-07-06 11:41:12 +03:00
parent d6dea13a6f
commit de5acb2abd

View file

@ -17,6 +17,8 @@ char * copyright = COPYRIGHT;
# define MYRAND_ARC4RANDOM 1
#elif defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 36)))
# define MYRAND_ARC4RANDOM 1
#elif defined(__GLIBC__) && ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 25)))
# define MYRAND_FALLBACK 1
#elif defined(__linux__)
# define MYRAND_GETRANDOM 1
# include <sys/random.h>