SOURCES: whois-idn.patch (NEW) - fallback to no AI_IDN if glibc do...

qboosh qboosh at pld-linux.org
Fri Jul 21 14:32:22 CEST 2006


Author: qboosh                       Date: Fri Jul 21 12:32:22 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fallback to no AI_IDN if glibc doesn't support it

---- Files affected:
SOURCES:
   whois-idn.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/whois-idn.patch
diff -u /dev/null SOURCES/whois-idn.patch:1.1
--- /dev/null	Fri Jul 21 14:32:22 2006
+++ SOURCES/whois-idn.patch	Fri Jul 21 14:32:16 2006
@@ -0,0 +1,16 @@
+--- whois-4.7.14/whois.c.orig	2006-07-21 14:27:55.524440000 +0200
++++ whois-4.7.14/whois.c	2006-07-21 14:29:06.354440000 +0200
+@@ -695,7 +695,12 @@
+     hints.ai_socktype = SOCK_STREAM;
+     hints.ai_flags = AI_IDN;
+ 
+-    if ((err = getaddrinfo(server, port ? port : "nicname", &hints, &res)) != 0)
++    err = getaddrinfo(server, port ? port : "nicname", &hints, &res);
++    if (err == EAI_BADFLAGS) {
++	hints.ai_flags &= ~AI_IDN;
++	err = getaddrinfo(server, port ? port : "nicname", &hints, &res);
++    }
++    if (err != 0)
+ 	err_quit("getaddrinfo(%s): %s", server, gai_strerror(err));
+     for (ai = res; ai; ai = ai->ai_next) {
+ 	if ((fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0)
================================================================


More information about the pld-cvs-commit mailing list