From 7c9d03a4ee905c4072fd98d1858ba31c93713e38 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 1 Feb 1999 03:08:27 +0000 Subject: [PATCH] (tn): only call gethostbyname2 with AF_INET6 if we actually have IPv6. From "Brandon S. Allbery KF8NH" git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5321 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/telnet/telnet/commands.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appl/telnet/telnet/commands.c b/appl/telnet/telnet/commands.c index 43bafc38e..9433fcc7f 100644 --- a/appl/telnet/telnet/commands.c +++ b/appl/telnet/telnet/commands.c @@ -2138,8 +2138,10 @@ tn(int argc, char **argv) hostname = _hostname; } else { #ifdef HAVE_GETHOSTBYNAME2 +#ifdef HAVE_IPV6 host = gethostbyname2(hostp, AF_INET6); if(host == NULL) +#endif host = gethostbyname2(hostp, AF_INET); #else host = roken_gethostbyname(hostp);