diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-10-03 10:12:06 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-10-03 10:12:06 +0000 |
commit | 4284190cc417dccd975a5df158384eec1c9cd272 (patch) | |
tree | 6f318e83d8422859d5ee6bd1e3acf3cae2e940f4 | |
parent | 5e4cbd2d24358d2a0b144686b67875965f8a888e (diff) |
Ok, based on the online docs for AIX'es getservbyport_r() I adjusted to code
to do (what I believe is) "right". See docs on:
http://publib.boulder.ibm.com/infocenter/pseries/index.jsp?topic=/com.ibm.aix.doc/libs/commtrf2/getservbyport_r.htm
-rw-r--r-- | ares/ares_getnameinfo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c index ac54f13fa..236d82bd0 100644 --- a/ares/ares_getnameinfo.c +++ b/ares/ares_getnameinfo.c @@ -269,6 +269,7 @@ static char *lookup_service(unsigned short port, int flags, char buf[4096]; int len = 4096; #elif GETSERVBYPORT_R_ARGS == 4 + struct servent ret; struct servent_data sed; #endif if (flags & ARES_NI_UDP) @@ -287,7 +288,7 @@ static char *lookup_service(unsigned short port, int flags, #elif GETSERVBYPORT_R_ARGS == 5 se = getservbyport_r(port, proto, se, buf, len); #elif GETSERVBYPORT_R_ARGS == 4 - se = &sed; + se = &ret; if (getservbyport_r(port, proto, se, &sed) == -1) se = NULL; #else |