Software /
code /
prosody
Changeset
7831:201d0df6cce9
util.crand: Comment about getrandom
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 22 Jan 2017 09:55:44 +0100 |
parents | 7830:b9910a507250 |
children | 7832:d02ef0ae94af |
files | util-src/crand.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util-src/crand.c Sun Jan 22 09:32:33 2017 +0100 +++ b/util-src/crand.c Sun Jan 22 09:55:44 2017 +0100 @@ -34,7 +34,10 @@ #error getrandom() requires Linux 3.17 or later #endif -/* Was this not supposed to be a function? */ +/* + * This acts like a read from /dev/urandom with the exception that it + * *does* block if the entropy pool is not yet initialized. + */ int getrandom(void *buf, size_t len, int flags) { return syscall(SYS_getrandom, buf, len, flags); }