From: Jakub Bogusz Date: Fri, 21 Jul 2006 12:32:16 +0000 (+0000) Subject: - fallback to no AI_IDN if glibc doesn't support it X-Git-Tag: auto/ac/whois-4_7_14-2~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fwhois.git;a=commitdiff_plain;h=126789cab80e6a9afff2846aea7eecceb18fc886 - fallback to no AI_IDN if glibc doesn't support it Changed files: whois-idn.patch -> 1.1 --- diff --git a/whois-idn.patch b/whois-idn.patch new file mode 100644 index 0000000..c513406 --- /dev/null +++ b/whois-idn.patch @@ -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)