summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rw-r--r--src/sysdeps/trygetrandom.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/configure b/configure
index 1eaccd3..f93b835 100755
--- a/configure
+++ b/configure
@@ -511,7 +511,7 @@ EOF
choose cl futimes FUTIMES 'futimes()'
choose cl arc4random ARC4RANDOM 'arc4random()'
choose cl arc4random_addrandom ARC4RANDOM_ADDRANDOM 'arc4random_addrandom()'
- choose cl getrandom GETRANDOM 'getrandom()'
+ choose clr getrandom GETRANDOM 'getrandom()'
choose cl itimer ITIMER 'setitimer()'
echo '#endif' >> $sysdeps/sysdeps.h
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 ;
}