Some macOS versions do not define AI_NUMERICSERV. Other source files
check whether it is defined before using it; do so here as well.
[ghudson@mit.edu: rewrote commit message; slightly changed approach]
(cherry picked from commit
f8ecc0ae74c7ebd84f042e28079aa6b4b2ae405c)
ticket: 9062
version_fixed: 1.20.1
* resolution. */
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;
- hints.ai_flags = AI_PASSIVE | AI_NUMERICSERV;
+ hints.ai_flags = AI_PASSIVE;
+#ifdef AI_NUMERICSERV
+ hints.ai_flags |= AI_NUMERICSERV;
+#endif
/* Add all the requested addresses. */
for (i = 0; i < bind_addresses.n; i++) {