summaryrefslogtreecommitdiff
path: root/net/libcares/patches/patch-ab
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2006-07-18 22:38:18 +0000
committeradrianp <adrianp@pkgsrc.org>2006-07-18 22:38:18 +0000
commit90632e9598416269bd2ff1e5d049d7978b14fea5 (patch)
treea24004a515ce44a2048512d2ae7fe232f4a077a2 /net/libcares/patches/patch-ab
parent04dea1605fc44d79ee6a27f2eebebe8d00bda551 (diff)
downloadpkgsrc-90632e9598416269bd2ff1e5d049d7978b14fea5.tar.gz
Add ares_get_config() from CVS for unrealircd 3.2.5 to work
Bump to nb1
Diffstat (limited to 'net/libcares/patches/patch-ab')
-rw-r--r--net/libcares/patches/patch-ab29
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;
++}
++