(tn): only call gethostbyname2 with AF_INET6 if we actually have

IPv6.  From "Brandon S. Allbery KF8NH" <allbery@kf8nh.apk.net>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5321 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-02-01 03:08:27 +00:00
parent 6e78d0353d
commit 7c9d03a4ee

View File

@@ -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);