diff --git a/btpd/main.c b/btpd/main.c index cabe0d2..5eb40fd 100644 --- a/btpd/main.c +++ b/btpd/main.c @@ -2,13 +2,13 @@ #include <sys/file.h> #include <sys/stat.h> -#include <assert.h> #include <err.h> #include <errno.h> +#include <event.h> +#include <evdns.h> #include <fcntl.h> #include <getopt.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> #include <unistd.h> @@ -216,6 +216,12 @@ args_done: event_init(); + if ((errno = evdns_resolv_conf_parse(DNS_OPTION_NAMESERVERS, + "/etc/resolv.conf")) != 0) { + btpd_log(BTPD_L_ERROR, + "failed to setup dns from /etc/resolv.conf (%d).\n", errno); + } + btpd_init(); event_dispatch();