Build correctly with older libevents

This commit is contained in:
Nick Mathewson 2013-09-09 15:29:19 -04:00
parent 05f8429a28
commit 4e00625bbe
2 changed files with 3 additions and 0 deletions

View File

@ -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>

View File

@ -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) {