[asterisk-commits] mmichelson: trunk r275587 - /trunk/main/netsock2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 12 09:55:29 CDT 2010


Author: mmichelson
Date: Mon Jul 12 09:55:23 2010
New Revision: 275587

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=275587
Log:
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)


Modified:
    trunk/main/netsock2.c

Modified: trunk/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/netsock2.c?view=diff&rev=275587&r1=275586&r2=275587
==============================================================================
--- trunk/main/netsock2.c (original)
+++ trunk/main/netsock2.c Mon Jul 12 09:55:23 2010
@@ -195,7 +195,11 @@
 	/* 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));




More information about the asterisk-commits mailing list