From adab75ce4ba2d54691afeb44cf8e45285a19b399 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 3 Jun 2003 23:21:17 +0000 Subject: [PATCH] * locate_kdc.c (get_port): Replace function with macro git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15554 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 4 ++++ src/lib/krb5/os/locate_kdc.c | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) 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) -- 2.26.2