Explorar o código

AK: Enable arc4random_buf on glibc 2.36+

We have arc4random starting from 2.36, no reason not to use it :^)
Sergey Bugaev hai 1 ano
pai
achega
0143e5a36d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AK/Random.h

+ 1 - 1
AK/Random.h

@@ -20,7 +20,7 @@ namespace AK {
 
 inline void fill_with_random([[maybe_unused]] Bytes bytes)
 {
-#if defined(AK_OS_SERENITY) || defined(AK_OS_ANDROID) || defined(AK_OS_BSD_GENERIC)
+#if defined(AK_OS_SERENITY) || defined(AK_OS_ANDROID) || defined(AK_OS_BSD_GENERIC) || AK_LIBC_GLIBC_PREREQ(2, 36)
     arc4random_buf(bytes.data(), bytes.size());
 #elif defined(OSS_FUZZ)
 #else