aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--src/or/main.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e2b2dd60c..8992c84e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -400,6 +400,7 @@ AC_CHECK_FUNCS([event_get_version \
event_get_method \
event_set_log_callback \
evdns_set_outgoing_bind_address \
+ evutil_secure_rng_set_urandom_device_file \
event_base_loopexit])
AC_CHECK_MEMBERS([struct event.min_heap_idx], , ,
[#include <event.h>
diff --git a/src/or/main.c b/src/or/main.c
index 18e8bc44a..01f6b5c75 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2804,8 +2804,10 @@ tor_main(int argc, char *argv[])
}
// registering libevent rng
+#ifdef HAVE_EVUTIL_SECURE_RNG_SET_URANDOM_DEVICE_FILE
evutil_secure_rng_set_urandom_device_file(
(char*) sandbox_intern_string("/dev/urandom"));
+#endif
}
switch (get_options()->command) {