diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-04-26 17:09:46 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-04-26 17:09:46 +0000 |
commit | 880d31d1bbc0ee82a7bfae2423f27592ca507cff (patch) | |
tree | a0dd03ba7605330c1da5a60bbaaff19cad22b7c6 /src | |
parent | b2eac2dedd62224df07148a9e42eae0197902c00 (diff) | |
download | skalibs-880d31d1bbc0ee82a7bfae2423f27592ca507cff.tar.xz |
Fix getrandom() detection: need to run the test, not only link!
Diffstat (limited to 'src')
-rw-r--r-- | src/sysdeps/trygetrandom.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 ; } |