ref: bb765c37acdaea58a3ffdcca6309fa371ee04d07
parent: 16d05a56a0d356d6dd442ceb23ec11deb68015d1
author: Timothy B. Terriberry <tterribe@xiph.org>
date: Fri Feb 27 05:59:51 EST 2015
Broaden the test for AI_NUMERICSERV. OS X 10.5.8 does not define AI_NUMIERCSERV either, so instead of trying to enumerate the platforms that don't, just test for the value itself. Patch by Dave Evans at MacPorts. Fixes #2172
--- a/src/http.c
+++ b/src/http.c
@@ -721,7 +721,7 @@
char service[6];
memset(&hints,0,sizeof(hints));
hints.ai_socktype=SOCK_STREAM;
-#if !defined(_WIN32)
+#if defined(AI_NUMERICSERV)
hints.ai_flags=AI_NUMERICSERV;
#endif
OP_ASSERT(_port<=65535U);