diff options
author | roam <roam@FreeBSD.org> | 2010-03-25 19:54:02 +0800 |
---|---|---|
committer | roam <roam@FreeBSD.org> | 2010-03-25 19:54:02 +0800 |
commit | 319032a75fdca534e0fd84967428f7f287d637c6 (patch) | |
tree | ea79b126e50f1baaf00e7f5ec7e99210c677a454 | |
parent | f28c16524d5372a8fdca5e5d1f6c640418fa6d4f (diff) | |
download | freebsd-ports-gnome-319032a75fdca534e0fd84967428f7f287d637c6.tar.gz freebsd-ports-gnome-319032a75fdca534e0fd84967428f7f287d637c6.tar.zst freebsd-ports-gnome-319032a75fdca534e0fd84967428f7f287d637c6.zip |
Update to c-ares 1.7.1 and redo the config patch to also support
IPv6 nameserver addresses.
-rw-r--r-- | dns/c-ares/Makefile | 4 | ||||
-rw-r--r-- | dns/c-ares/distinfo | 6 | ||||
-rw-r--r-- | dns/c-ares/files/ares-config-info.patch | 35 | ||||
-rw-r--r-- | dns/c-ares/files/patch-Makefile.in | 4 |
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 |