]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Build correctly with older libevents
authorNick Mathewson <nickm@torproject.org>
Mon, 9 Sep 2013 19:29:19 +0000 (15:29 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 Sep 2013 19:29:19 +0000 (15:29 -0400)
configure.ac
src/or/main.c

index e2b2dd60cc32d26b84caaa9cf5d9b0577479ad4d..8992c84e039354c38cef50a2468b498bfa1bf5fe 100644 (file)
@@ -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>
index 18e8bc44aecde81beba6556cedf6664161da332e..01f6b5c755ca7e3f47aecdcf8c5a570ccccf5f30 100644 (file)
@@ -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) {