aboutsummaryrefslogtreecommitdiff
path: root/dns/c-ares
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2010-03-25 11:54:02 +0000
committerPeter Pentchev <roam@FreeBSD.org>2010-03-25 11:54:02 +0000
commit27109dac2cf4c435f886a8067521a2b600a20002 (patch)
treee18e80370f08c528ea564f014acff47a52b760f4 /dns/c-ares
parente4978089e85977b26c487f21568b8e156ae0680c (diff)
downloadports-27109dac2cf4c435f886a8067521a2b600a20002.tar.gz
ports-27109dac2cf4c435f886a8067521a2b600a20002.zip
Notes
Diffstat (limited to 'dns/c-ares')
-rw-r--r--dns/c-ares/Makefile4
-rw-r--r--dns/c-ares/distinfo6
-rw-r--r--dns/c-ares/files/ares-config-info.patch35
-rw-r--r--dns/c-ares/files/patch-Makefile.in4
4 files changed, 36 insertions, 13 deletions
diff --git a/dns/c-ares/Makefile b/dns/c-ares/Makefile
index 29354fccedd9..dcbd9fc29a5d 100644
--- a/dns/c-ares/Makefile
+++ b/dns/c-ares/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= c-ares
-PORTVERSION= 1.7.0
+PORTVERSION= 1.7.1
CATEGORIES= dns
MASTER_SITES= http://c-ares.haxx.se/
@@ -58,6 +58,7 @@ MAN3= ares_cancel.3 \
ares_expand_name.3 ares_expand_string.3 \
ares_fds.3 \
ares_free_data.3 ares_free_hostent.3 ares_free_string.3 \
+ ares_get_servers.3 \
ares_gethostbyaddr.3 ares_gethostbyname.3 ares_gethostbyname_file.3 \
ares_getnameinfo.3 \
ares_getsock.3 \
@@ -70,6 +71,7 @@ MAN3= ares_cancel.3 \
ares_query.3 \
ares_search.3 \
ares_send.3 ares_set_socket_callback.3 \
+ ares_set_servers.3 \
ares_strerror.3 \
ares_timeout.3 \
ares_version.3 \
diff --git a/dns/c-ares/distinfo b/dns/c-ares/distinfo
index 45a71dc20453..164e5415e1fc 100644
--- a/dns/c-ares/distinfo
+++ b/dns/c-ares/distinfo
@@ -1,3 +1,3 @@
-MD5 (c-ares-1.7.0.tar.gz) = 15ab7852306b554b0b1145f41005a3bb
-SHA256 (c-ares-1.7.0.tar.gz) = c6b7104c25426778c1db66ee6cdaad028fad243c5c42c09cc638bd85c985fae3
-SIZE (c-ares-1.7.0.tar.gz) = 617652
+MD5 (c-ares-1.7.1.tar.gz) = dc7e0f32e92613aed9aff233a6b69753
+SHA256 (c-ares-1.7.1.tar.gz) = d34386e3beac222deeff34cecc3ffd8d1a1b4717f7e94f84ff96434bab613ad7
+SIZE (c-ares-1.7.1.tar.gz) = 626876
diff --git a/dns/c-ares/files/ares-config-info.patch b/dns/c-ares/files/ares-config-info.patch
index 2fe403134c59..d878cd47030b 100644
--- a/dns/c-ares/files/ares-config-info.patch
+++ b/dns/c-ares/files/ares-config-info.patch
@@ -1,7 +1,10 @@
Description: Add the ares_get_config() routine used by Unreal IRCd.
+ Originally taken from the Unreal IRCd distribution, later modified
+ by me to properly support IPv6 nameserver addresses since c-ares-1.7.1.
Origin: the Unreal IRCd distribution
+Author: Peter Pentchev <roam@FreeBSD.org>
Forwarded: no
-Last-Update: 2010-03-22
+Last-Update: 2010-03-25
--- ares.h.orig
+++ ares.h
@@ -20,9 +23,9 @@ Last-Update: 2010-03-22
struct hostent;
struct timeval;
struct sockaddr;
-@@ -487,6 +495,8 @@
-
- CARES_EXTERN const char *ares_strerror(int code);
+@@ -502,6 +510,8 @@
+ CARES_EXTERN int ares_get_servers(ares_channel channel,
+ struct ares_addr_node **servers);
+CARES_EXTERN int ares_get_config(struct ares_config_info *d, ares_channel c);
+
@@ -31,14 +34,23 @@ Last-Update: 2010-03-22
#endif
--- ares_init.c.orig
+++ ares_init.c
-@@ -1498,6 +1498,26 @@
+@@ -67,6 +67,7 @@
+ #include <errno.h>
+ #include "ares.h"
+ #include "inet_net_pton.h"
++#include "inet_ntop.h"
+ #include "ares_library_init.h"
+ #include "ares_private.h"
+
+@@ -1520,6 +1521,36 @@
}
#endif /* !WIN32 && !WATT32 */
+int ares_get_config(struct ares_config_info *d, ares_channel c)
+{
+ int i;
-+ char *p;
++ const char *p;
++ char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
+
+ memset(d, 0, sizeof(struct ares_config_info));
+
@@ -48,7 +60,16 @@ Last-Update: 2010-03-22
+ d->servers = calloc(sizeof(char *), c->nservers);
+ for (i = 0; i < c->nservers; i++)
+ {
-+ p = inet_ntoa(c->servers[i].addr);
++ if (c->servers[i].addr.family == AF_INET)
++ p = ares_inet_ntop(c->servers[i].addr.family,
++ (const char *)&c->servers[i].addr.addrV4,
++ tmp, sizeof(tmp));
++ else if (c->servers[i].addr.family == AF_INET6)
++ p = ares_inet_ntop(c->servers[i].addr.family,
++ (const char *)&c->servers[i].addr.addrV6,
++ tmp, sizeof(tmp));
++ else
++ p = NULL;
+ d->servers[i] = p ? strdup(p) : NULL;
+ }
+
diff --git a/dns/c-ares/files/patch-Makefile.in b/dns/c-ares/files/patch-Makefile.in
index e6a2d66cf732..5978958aeba8 100644
--- a/dns/c-ares/files/patch-Makefile.in
+++ b/dns/c-ares/files/patch-Makefile.in
@@ -1,11 +1,11 @@
Description: Place the pkgconfig file in the correct directory on FreeBSD.
Author: Peter Pentchev <roam@FreeBSD.org>
Forwarded: not-needed
-Last-Update: 2009-03-22
+Last-Update: 2009-03-25
--- Makefile.in.orig
+++ Makefile.in
-@@ -316,7 +316,7 @@
+@@ -317,7 +317,7 @@
CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
DISTCLEANFILES = ares_build.h