From 705053409dade9bc9f691a25f9754a129fa37406 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Tue, 30 Aug 2016 11:18:13 +0200 Subject: Use syscall() to call getrandom() --- src/openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/openssl.c b/src/openssl.c index 136110f..c25651b 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -59,6 +59,7 @@ #include #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) #define HAVE_GETRANDOM +#include #include #else #define HAVE_SYS_SYSCTL_H @@ -7852,7 +7853,7 @@ static int randL_stir(struct randL_state *st, unsigned rqstd) { while (count < rqstd) { size_t n = MIN(rqstd - count, sizeof data); - n = getrandom(data, n, 0); + n = syscall(SYS_getrandom, data, n, 0); if (n == -1) { break; -- cgit v1.2.3-59-g8ed1b