mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user