From e98a2a237a3893d9d1c783f7c2dab0ae05e56e24 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 29 Mar 1990 14:34:00 +0000 Subject: [PATCH] add #ifdef KRB5_USE_INET use proper code from krb5_get_krbhst git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@426 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/locate_kdc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 42c061149..009a0c844 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -17,12 +17,15 @@ static char rcsid_locate_kdc_c[] = #include #include +#include #include #include #include +#ifdef KRB5_USE_INET #include +#endif #include #define KRB5_UDP_PORT 8973 /* XXX */ @@ -44,9 +47,8 @@ int krb5_locate_kdc(realm, addr_pp) hostlist = 0; - code = krb5_get_krbhst (realm, &hostlist); - if (code != 0) - return 0; /* XXX losing error code */ + if (code = krb5_get_krbhst (realm, &hostlist)) + return(code); for (i=0; hostlist[i]; i++) ; @@ -61,6 +63,7 @@ int krb5_locate_kdc(realm, addr_pp) hp = gethostbyname(hostlist[i]); if (hp != 0) { switch (hp->h_addrtype) { +#ifdef KRB5_USE_INET case AF_INET: for (j=0; hp->h_addr_list[j]; j++) { sin_p = (struct sockaddr_in *) &addr_p[out++]; @@ -78,6 +81,7 @@ int krb5_locate_kdc(realm, addr_pp) } } break; +#endif default: break; } -- 2.26.2