aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/bionic_arc4random.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/bionic/bionic_arc4random.cpp')
-rw-r--r--libc/bionic/bionic_arc4random.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libc/bionic/bionic_arc4random.cpp b/libc/bionic/bionic_arc4random.cpp
index fa2617f0d..74ac43cb2 100644
--- a/libc/bionic/bionic_arc4random.cpp
+++ b/libc/bionic/bionic_arc4random.cpp
@@ -35,9 +35,7 @@
#include <async_safe/log.h>
-#include "private/KernelArgumentBlock.h"
-
-void __libc_safe_arc4random_buf(void* buf, size_t n, KernelArgumentBlock& args) {
+void __libc_safe_arc4random_buf(void* buf, size_t n) {
// Only call arc4random_buf once we have `/dev/urandom` because getentropy(3)
// will fall back to using `/dev/urandom` if getrandom(2) fails, and abort if
// if can't use `/dev/urandom`.
@@ -53,7 +51,7 @@ void __libc_safe_arc4random_buf(void* buf, size_t n, KernelArgumentBlock& args)
16 - at_random_bytes_consumed, n);
}
- memcpy(buf, reinterpret_cast<char*>(args.getauxval(AT_RANDOM)) + at_random_bytes_consumed, n);
+ memcpy(buf, reinterpret_cast<char*>(getauxval(AT_RANDOM)) + at_random_bytes_consumed, n);
at_random_bytes_consumed += n;
return;
}