X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/bf87f4b5b1275a7c0963432aae670d6b19ac6e0d..8ee8df9cf84f6ae595eb82ebe7e5eb119112087e:/evdns.c diff --git a/evdns.c b/evdns.c index 6541fc8..fa81f38 100644 --- a/evdns.c +++ b/evdns.c @@ -1,4 +1,5 @@ -/* $Id: evdns.c,v 1.1 2007-11-01 15:46:43 root Exp $ */ +#define DNS_USE_GETTIMEOFDAY_FOR_ID 1 +#define HAVE_STRUCT_IN6_ADDR 1 /* The original version of this module was written by Adam Langley; for * a history of modifications, check out the subversion logs. @@ -94,7 +95,6 @@ #include #include "evdns.h" -/*#include "log.h"*/ #ifdef WIN32 #include #include @@ -2267,7 +2267,7 @@ int evdns_resolve_reverse(struct in_addr *in, int flags, evdns_callback_type cal } int evdns_resolve_reverse_ipv6(struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr) { - char buf[64]; + char buf[96]; char *cp; struct request *req; int i; @@ -2547,7 +2547,7 @@ evdns_resolv_set_defaults(int flags) { #ifndef HAVE_STRTOK_R static char * -strtok_r(char *s, const char *delim, char **state) { +fake_strtok_r(char *s, const char *delim, char **state) { return strtok(s, delim); } #endif @@ -2623,9 +2623,9 @@ static void resolv_conf_parse_line(char *const start, int flags) { char *strtok_state; static const char *const delims = " \t"; -#define NEXT_TOKEN strtok_r(NULL, delims, &strtok_state) +#define NEXT_TOKEN fake_strtok_r(NULL, delims, &strtok_state) - char *const first_token = strtok_r(start, delims, &strtok_state); + char *const first_token = fake_strtok_r(start, delims, &strtok_state); if (!first_token) return; if (!strcmp(first_token, "nameserver") && (flags & DNS_OPTION_NAMESERVERS)) {