Browse files

Guard against EAI_ADDRFAMILY not being defined, it seems to be glibc

specific


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1343243 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 54b7773 commit c8a398c4fb80fa494a422a2377087a29b020f86c Stefan Fritsch committed May 28, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 network_io/unix/sockaddr.c
View
5 network_io/unix/sockaddr.c
@@ -380,7 +380,10 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
* In case of EAI_BADFLAGS, AI_ADDRCONFIG is not supported.
*/
if ((family == APR_UNSPEC) && (error == EAI_BADFLAGS
- || error == EAI_ADDRFAMILY)) {
+#ifdef EAI_ADDRFAMILY
+ || error == EAI_ADDRFAMILY
+#endif
+ )) {
hints.ai_flags &= ~AI_ADDRCONFIG;
error = getaddrinfo(hostname, servname, &hints, &ai_list);
}

0 comments on commit c8a398c

Please sign in to comment.