From c2e231e88b526dfc2935956efa8f3098e4cd02a2 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 9 Sep 2005 21:33:25 +0000 Subject: [PATCH] * fake_addrinfo.c (getaddrinfo): AI_NUMERICSERV fix for AIX git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17380 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/ChangeLog | 9 +++++++++ src/util/support/fake-addrinfo.c | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/util/support/ChangeLog b/src/util/support/ChangeLog index 3da2ded6f..8aa8414c3 100644 --- a/src/util/support/ChangeLog +++ b/src/util/support/ChangeLog @@ -1,3 +1,12 @@ +2005-09-09 Ken Raeburn + + * fake_addrinfo.c (getaddrinfo): Conditionalize last change on + AI_NUMERICSERV being defined. + +2005-09-01 Marc Aurele La France + + * fake_addrinfo.c (getaddrinfo): AI_NUMERICSERV fix for AIX. + 2005-07-28 Jeffrey Altman * threads.c: Stub krb5int_pthread_loaded added for Windows diff --git a/src/util/support/fake-addrinfo.c b/src/util/support/fake-addrinfo.c index b07bb022a..6d534703d 100644 --- a/src/util/support/fake-addrinfo.c +++ b/src/util/support/fake-addrinfo.c @@ -1109,7 +1109,12 @@ getaddrinfo (const char *name, const char *serv, const struct addrinfo *hint, return EAI_SOCKTYPE; service_is_numeric = 1; service_port = htons(lport); - serv = "discard"; /* defined for both udp and tcp */ +#ifdef AI_NUMERICSERV + if (hint && hint->ai_flags & AI_NUMERICSERV) + serv = "9"; + else +#endif + serv = "discard"; /* defined for both udp and tcp */ if (hint) socket_type = hint->ai_socktype; } -- 2.26.2