From: Ken Raeburn Date: Tue, 3 Jun 2003 23:21:17 +0000 (+0000) Subject: * locate_kdc.c (get_port): Replace function with macro X-Git-Tag: krb5-1.4-beta1~884 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=adab75ce4ba2d54691afeb44cf8e45285a19b399;p=krb5.git * locate_kdc.c (get_port): Replace function with macro git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15554 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index ee06bfa50..f95b55f13 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,7 @@ +2003-06-03 Ken Raeburn + + * locate_kdc.c (get_port): Replace function with macro. + 2003-06-03 Alexandra Ellwood * init_os_ctx.c: Included header to get __KLAllowHomeDirectoryAccess(). diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 9c9fed4d1..067942b8f 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -100,12 +100,12 @@ _krb5_use_dns_realm(krb5_context context) #endif /* KRB5_DNS_LOOKUP */ -static int get_port (const char *service, int stream, int defalt) -{ #if 0 /* Only used for "kerberos" and "kerberos-sec", and we want the right port numbers even on the OSes that botch the entries in /etc/services. So don't bother with the lookup, except maybe to produce a warning. */ +static int get_port (const char *service, int stream, int defalt) +{ struct addrinfo hints = { 0 }; struct addrinfo *ai; int err; @@ -121,10 +121,12 @@ static int get_port (const char *service, int stream, int defalt) } freeaddrinfo (ai); } -#endif /* Any error - don't complain, just use default. */ return htons (defalt); } +#else +#define get_port(SERVICE, STREAM, DFL) htons(DFL) +#endif int krb5int_grow_addrlist (struct addrlist *lp, int nmore)