(krb5_sendto_kdc): 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@5322 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-02-01 03:09:02 +00:00
parent 7c9d03a4ee
commit 2872ceb0f7

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -266,8 +266,10 @@ krb5_sendto_kdc (krb5_context context,
if (colon)
*colon = '\0';
#ifdef HAVE_GETHOSTBYNAME2
#ifdef HAVE_IPV6
hostent = gethostbyname2 (p, AF_INET6);
if (hostent == NULL)
#endif
hostent = gethostbyname2 (p, AF_INET);
#else
hostent = roken_gethostbyname (p);