Explorar o código

Build correctly with older libevents

Nick Mathewson %!s(int64=10) %!d(string=hai) anos
pai
achega
4e00625bbe
Modificáronse 2 ficheiros con 3 adicións e 0 borrados
  1. 1 0
      configure.ac
  2. 2 0
      src/or/main.c

+ 1 - 0
configure.ac

@@ -400,6 +400,7 @@ AC_CHECK_FUNCS([event_get_version \
                 event_get_method \
                 event_get_method \
                 event_set_log_callback \
                 event_set_log_callback \
                 evdns_set_outgoing_bind_address \
                 evdns_set_outgoing_bind_address \
+                evutil_secure_rng_set_urandom_device_file \
                 event_base_loopexit])
                 event_base_loopexit])
 AC_CHECK_MEMBERS([struct event.min_heap_idx], , ,
 AC_CHECK_MEMBERS([struct event.min_heap_idx], , ,
 [#include <event.h>
 [#include <event.h>

+ 2 - 0
src/or/main.c

@@ -2804,8 +2804,10 @@ tor_main(int argc, char *argv[])
     }
     }
 
 
     // registering libevent rng
     // registering libevent rng
+#ifdef HAVE_EVUTIL_SECURE_RNG_SET_URANDOM_DEVICE_FILE
     evutil_secure_rng_set_urandom_device_file(
     evutil_secure_rng_set_urandom_device_file(
         (char*) sandbox_intern_string("/dev/urandom"));
         (char*) sandbox_intern_string("/dev/urandom"));
+#endif
   }
   }
 
 
   switch (get_options()->command) {
   switch (get_options()->command) {