* fake_addrinfo.c (getaddrinfo): AI_NUMERICSERV fix for AIX
authorKen Raeburn <raeburn@mit.edu>
Fri, 9 Sep 2005 21:33:25 +0000 (21:33 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 9 Sep 2005 21:33:25 +0000 (21:33 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17380 dc483132-0cff-0310-8789-dd5450dbe970

src/util/support/ChangeLog
src/util/support/fake-addrinfo.c

index 3da2ded6fe8bb062a2d969cfbd06778b58fa3467..8aa8414c34377b992401fcf69a8c148bc935a258 100644 (file)
@@ -1,3 +1,12 @@
+2005-09-09  Ken Raeburn  <raeburn@mit.edu>
+
+       * fake_addrinfo.c (getaddrinfo): Conditionalize last change on
+       AI_NUMERICSERV being defined.
+
+2005-09-01  Marc Aurele La France  <tsi@ualberta.ca>
+
+       * fake_addrinfo.c (getaddrinfo):  AI_NUMERICSERV fix for AIX.
+
 2005-07-28  Jeffrey Altman <jaltman@mit.edu>
 
         * threads.c: Stub krb5int_pthread_loaded added for Windows
index b07bb022ae9e4214d76199f5ed7283eea09e7aed..6d534703d6dd3e86a8714895a49e213adede81bc 100644 (file)
@@ -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;
        }