mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-16 09:08:01 -05:00
- 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:
parent
a6eb4fd0a8
commit
160dd56c4a
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue