Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ok, based on the online docs for AIX'es getservbyport_r() I adjusted …

  • Loading branch information...
commit 876ea69745fcc3f9e38cb54175eacc571afda198 1 parent 209e814
@bagder authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  ares_getnameinfo.c
View
3  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
Please sign in to comment.
Something went wrong with that request. Please try again.