diff options
Diffstat (limited to 'net/libcares/patches/patch-ab')
-rw-r--r-- | net/libcares/patches/patch-ab | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/net/libcares/patches/patch-ab b/net/libcares/patches/patch-ab new file mode 100644 index 00000000000..32f510af859 --- /dev/null +++ b/net/libcares/patches/patch-ab @@ -0,0 +1,29 @@ +$NetBSD: patch-ab,v 1.1 2006/07/18 22:38:18 adrianp Exp $ + +--- ares_init.c.orig 2005-08-22 07:40:07.000000000 +0100 ++++ ares_init.c +@@ -1060,3 +1060,24 @@ static void natural_mask(struct apattern + pat->mask.addr.addr4.s_addr = htonl(IN_CLASSC_NET); + } + #endif ++ ++int ares_get_config(struct ares_config_info *d, ares_channel c) ++{ ++int i; ++char *p; ++ ++ memset(d, 0, sizeof(struct ares_config_info)); ++ ++ d->timeout = c->timeout; ++ d->tries = c->tries; ++ d->numservers = c->nservers; ++ d->servers = calloc(sizeof(char *), c->nservers); ++ for (i = 0; i < c->nservers; i++) ++ { ++ p = inet_ntoa(c->servers[i].addr); ++ d->servers[i] = p ? strdup(p) : NULL; ++ } ++ ++ return ARES_SUCCESS; ++} ++ |