summaryrefslogtreecommitdiff
path: root/whois.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2012-03-05 22:56:19 +0100
committerMarco d'Itri <md@linux.it>2013-03-30 02:31:41 +0100
commit51d8f998dd627c970e9afbf4e0b87dd6ba0e0284 (patch)
tree5a27115112da2df81517bb2e7753b3e67da367b2 /whois.c
parentac181807bfbcd9582e2b103da2b7966f80d99b62 (diff)
downloadwhois-51d8f998dd627c970e9afbf4e0b87dd6ba0e0284.tar.gz
Imported Debian version 5.0.15v5.0.15
Diffstat (limited to 'whois.c')
-rw-r--r--whois.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/whois.c b/whois.c
index b4c4274..0ddb9a5 100644
--- a/whois.c
+++ b/whois.c
@@ -851,7 +851,10 @@ int openconn(const char *server, const char *port)
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_ADDRCONFIG | AI_IDN;
+ hints.ai_flags = AI_ADDRCONFIG;
+#ifdef HAVE_LIBIDN
+ hints.ai_flags |= AI_IDN;
+#endif
if ((err = getaddrinfo(server, port ? port : "nicname", &hints, &res))
!= 0) {