diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-02-15 16:47:47 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-02-15 16:47:47 -0500 |
commit | 4e082ec84bb292db88537f656375c4403b14f20b (patch) | |
tree | 0714e5c6d60f630d9fa9f67121292ca84c779874 /src/or/dns.c | |
parent | 79bdfb63e9936619d1d5fd50cab8694db5052291 (diff) | |
download | tor-4e082ec84bb292db88537f656375c4403b14f20b.tar.gz tor-4e082ec84bb292db88537f656375c4403b14f20b.zip |
Build correctly with Libevent 2.0.4-alpha and later
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index c055c885b7..a9f6426042 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -41,14 +41,22 @@ struct evdns_request; evdns_resume() #define evdns_base_config_windows_nameservers(base) \ evdns_config_windows_nameservers() -#define evdns_base_set_option(base, opt, val, flags) \ - evdns_set_option((opt),(val),(flags)) +#define evdns_base_set_option_(base, opt, val) \ + evdns_set_option((opt),(val),DNS_OPTIONS_ALL) #define evdns_base_resolve_ipv4(base, addr, options, cb, ptr) \ ((evdns_resolve_ipv4(addr, options, cb, ptr)<0) ? NULL : ((void*)1)) #define evdns_base_resolve_reverse(base, addr, options, cb, ptr) \ ((evdns_resolve_reverse(addr, options, cb, ptr)<0) ? NULL : ((void*)1)) #define evdns_base_resolve_reverse_ipv6(base, addr, options, cb, ptr) \ ((evdns_resolve_reverse_ipv6(addr, options, cb, ptr)<0) ? NULL : ((void*)1)) + +#elif defined(LIBEVENT_VERSION_NUMBER) && LIBEVENT_VERSION_NUMBER < 0x02000303 +#define evdns_base_set_option_(base, opt, val) \ + evdns_base_set_option((base), (opt),(val),DNS_OPTIONS_ALL) + +#else +#define evdns_base_set_option_ evdns_base_set_option + #endif /** Longest hostname we're willing to resolve. */ @@ -1239,8 +1247,7 @@ configure_nameservers(int force) } #endif -#define SET(k,v) \ - evdns_base_set_option(the_evdns_base, (k), (v), DNS_OPTIONS_ALL) +#define SET(k,v) evdns_base_set_option_(the_evdns_base, (k), (v)) if (evdns_base_count_nameservers(the_evdns_base) == 1) { SET("max-timeouts:", "16"); |