Skip to content
Snippets Groups Projects
Commit b1b29e52 authored by Mark Michelson's avatar Mark Michelson
Browse files

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
parent f1df8ea2
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment