summaryrefslogtreecommitdiff
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@toke.dk>2021-04-01 19:20:13 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2021-06-06 16:26:06 +0200
commitc48ebde5ce6db3da8cd571d213d1a1f265de8983 (patch)
treee465e1372465923b1123fd3957218eae84432868 /sysdep/unix/main.c
parent91d04583891f7a6f4aee612cf3f143cc84a73991 (diff)
sysdep: Add wrapper to get random bytes
Add a wrapper function in sysdep to get random bytes, and required checks in configure.ac to select how to do it. The configure script tries, in order, getrandom(), getentropy() and reading from /dev/urandom.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 76f92c5e..392aff9d 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -867,6 +867,7 @@ main(int argc, char **argv)
parse_args(argc, argv);
log_switch(1, NULL, NULL);
+ random_init();
net_init();
resource_init();
timer_init();