]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix compilation with libevent 1
authorNick Mathewson <nickm@torproject.org>
Fri, 20 Sep 2013 00:25:05 +0000 (20:25 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 20 Sep 2013 00:25:05 +0000 (20:25 -0400)
a9910d89 added trickery to make us work with interned strings and
seccomp; it requires libevent 2.

Fix for 9785; bug not in any released tor.

src/or/dns.c

index 62ee4f372df8592c6fe4d8b08365ed718f3c76db..a1fe0de1d73cb04d45352da4ada8e0646c6e3b4e 100644 (file)
@@ -1493,11 +1493,13 @@ configure_nameservers(int force)
       evdns_base_search_clear(the_evdns_base);
       evdns_base_clear_nameservers_and_suspend(the_evdns_base);
     }
+#if defined(DNS_OPTION_HOSTSFILE) && defined(USE_LIBSECCOMP)
     if (flags & DNS_OPTION_HOSTSFILE) {
       flags ^= DNS_OPTION_HOSTSFILE;
       evdns_base_load_hosts(the_evdns_base,
-          sandbox_intern_string("/etc/resolv.conf"));
+          sandbox_intern_string("/etc/hosts"));
     }
+#endif
     log_info(LD_EXIT, "Parsing resolver configuration in '%s'", conf_fname);
     if ((r = evdns_base_resolv_conf_parse(the_evdns_base, flags,
         sandbox_intern_string(conf_fname)))) {