[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Build correctly with older libevents



commit 4e00625bbe030f5c1ae54fb7c4c07dd061ab8644
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Sep 9 15:29:19 2013 -0400

    Build correctly with older libevents
---
 configure.ac  |    1 +
 src/or/main.c |    2 ++
 2 files changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index e2b2dd6..8992c84 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 18e8bc4..01f6b5c 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) {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits