From 880d31d1bbc0ee82a7bfae2423f27592ca507cff Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 26 Apr 2017 17:09:46 +0000 Subject: Fix getrandom() detection: need to run the test, not only link! --- src/sysdeps/trygetrandom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sysdeps') diff --git a/src/sysdeps/trygetrandom.c b/src/sysdeps/trygetrandom.c index b6cda18..8abe3dd 100644 --- a/src/sysdeps/trygetrandom.c +++ b/src/sysdeps/trygetrandom.c @@ -19,5 +19,6 @@ static int getrandom (void *buf, size_t buflen, unsigned int flags) int main (void) { char buf[4] ; - return getrandom(buf, 4, 0) ; + if (getrandom(buf, 4, 0) < 0) return 1 ; + return 0 ; } -- cgit 1.4.1