- Use the getrandom syscall introduced in Linux 3.17 (from Heiner Kallweit).

git-svn-id: file:///svn/unbound/trunk@3338 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2015-02-20 09:19:32 +00:00
parent a6eb4fd0a8
commit 160dd56c4a
2 changed files with 11 additions and 0 deletions

View file

@ -93,6 +93,13 @@ getentropy(void *buf, size_t len)
return -1;
}
#ifdef SYS_getrandom
/* try to use getrandom syscall introduced with kernel 3.17 */
ret = syscall(SYS_getrandom, buf, len, 0);
if (ret != -1)
return (ret);
#endif /* SYS_getrandom */
/*
* Try to get entropy with /dev/urandom
*

View file

@ -1,3 +1,7 @@
20 February 2015: Wouter
- Use the getrandom syscall introduced in Linux 3.17 (from Heiner
Kallweit).
19 February 2015: Wouter
- 1.5.2 release tag.
- svn trunk contains 1.5.3 under development.