aboutsummaryrefslogtreecommitdiffstats
path: root/dns
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2007-01-20 23:00:06 +0800
committerbms <bms@FreeBSD.org>2007-01-20 23:00:06 +0800
commit11ae3395e3a684940fe4bb6fec734b17f9d23392 (patch)
treee784ca5dbb54fc263db9a31ad5a0c176eb5a9ec3 /dns
parent5299588b857d95488f3fc23314e501b16f19d770 (diff)
downloadfreebsd-ports-gnome-11ae3395e3a684940fe4bb6fec734b17f9d23392.tar.gz
freebsd-ports-gnome-11ae3395e3a684940fe4bb6fec734b17f9d23392.tar.zst
freebsd-ports-gnome-11ae3395e3a684940fe4bb6fec734b17f9d23392.zip
Fix getaddrinfo(). Note that 'ssh foo.local' still doesn't work, because
the BSD NSS interface does not yet support dynamic getnameinfo().
Diffstat (limited to 'dns')
-rw-r--r--dns/nss_mdns/files/patch-src__bsdnss.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/dns/nss_mdns/files/patch-src__bsdnss.c b/dns/nss_mdns/files/patch-src__bsdnss.c
index 39d80ae8a48f..e2aa711cef94 100644
--- a/dns/nss_mdns/files/patch-src__bsdnss.c
+++ b/dns/nss_mdns/files/patch-src__bsdnss.c
@@ -1,6 +1,6 @@
---- src/bsdnss.c.orig Sat Jan 20 14:34:44 2007
-+++ src/bsdnss.c Sat Jan 20 14:35:23 2007
-@@ -0,0 +1,433 @@
+--- src/bsdnss.c.orig Sat Jan 20 14:52:09 2007
++++ src/bsdnss.c Sat Jan 20 14:56:24 2007
+@@ -0,0 +1,430 @@
+/* rcs tags go here when pushed upstream */
+/* Original author: Bruce M. Simpson <bms@FreeBSD.org> */
+
@@ -177,12 +177,6 @@
+ return (NS_UNAVAIL);
+ }
+
-+ /* XXX: review this check */
-+ if (pai->ai_flags != 0) {
-+ *resultp = sentinel.ai_next;
-+ return (NS_UNAVAIL);
-+ }
-+
+ mbufp = malloc((sizeof(struct hostent) + mbuflen));
+ if (mbufp == NULL) {
+ *resultp = sentinel.ai_next;
@@ -226,9 +220,12 @@
+
+ if (status == NS_SUCCESS) {
+ memset(ai, 0, sizeof(struct addrinfo));
-+ memset(pss, 0, sizeof(struct sockaddr_storage));
++ ai->ai_flags = pai->ai_flags;
++ ai->ai_socktype = pai->ai_socktype;
++ ai->ai_protocol = pai->ai_protocol;
+ ai->ai_family = hp->h_addrtype;
+ ai->ai_addrlen = hp->h_length;
++ memset(pss, 0, sizeof(struct sockaddr_storage));
+ pss->ss_len = hp->h_length;
+ pss->ss_family = hp->h_addrtype;
+ memcpy(&(((struct sockaddr *)pss)->sa_data),