aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
Diffstat (limited to 'util-src')
-rw-r--r--util-src/crand.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util-src/crand.c b/util-src/crand.c
index aa3379c2..7dd71a92 100644
--- a/util-src/crand.c
+++ b/util-src/crand.c
@@ -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);
}