]> git.pld-linux.org Git - packages/whois.git/blob - whois-idn.patch
- rel 4; specify explict config so /etc/whois.conf works
[packages/whois.git] / whois-idn.patch
1 --- whois-4.7.14/whois.c.orig   2006-07-21 14:27:55.524440000 +0200
2 +++ whois-4.7.14/whois.c        2006-07-21 14:29:06.354440000 +0200
3 @@ -695,7 +695,12 @@
4      hints.ai_socktype = SOCK_STREAM;
5      hints.ai_flags = AI_IDN;
6  
7 -    if ((err = getaddrinfo(server, port ? port : "nicname", &hints, &res)) != 0)
8 +    err = getaddrinfo(server, port ? port : "nicname", &hints, &res);
9 +    if (err == EAI_BADFLAGS) {
10 +       hints.ai_flags &= ~AI_IDN;
11 +       err = getaddrinfo(server, port ? port : "nicname", &hints, &res);
12 +    }
13 +    if (err != 0)
14         err_quit("getaddrinfo(%s): %s", server, gai_strerror(err));
15      for (ai = res; ai; ai = ai->ai_next) {
16         if ((fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0)
This page took 0.052732 seconds and 3 git commands to generate.