Allow netsock2.c to compile on systems that do not define AI_NUMERICSERV.

(closes issue #17617)
Reported by: pprindeville
Patches: 
      asterisk-trunk-bugid17617.patch uploaded by pprindeville (license 347)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2010-07-12 14:55:23 +00:00
parent f1df8ea2bf
commit b1b29e5214

View File

@@ -195,7 +195,11 @@ int ast_sockaddr_parse(struct ast_sockaddr *addr, const char *str, int flags)
/* Hint to get only one entry from getaddrinfo */
hints.ai_socktype = SOCK_DGRAM;
#ifdef AI_NUMERICSERV
hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
#else
hints.ai_flags = AI_NUMERICHOST;
#endif
if ((e = getaddrinfo(host, port, &hints, &res))) {
ast_log(LOG_ERROR, "getaddrinfo(\"%s\", \"%s\", ...): %s\n",
host, S_OR(port, "(null)"), gai_strerror(e));