diff options
-rw-r--r-- | client/red_peer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/red_peer.cpp b/client/red_peer.cpp index 007559c7..a8f12369 100644 --- a/client/red_peer.cpp +++ b/client/red_peer.cpp @@ -120,7 +120,10 @@ void RedPeer::connect_unsecure(const char* host, int portnr) ASSERT(_ctx == NULL && _ssl == NULL && _peer == INVALID_SOCKET); try { memset(&ai,0, sizeof(ai)); - ai.ai_flags = AI_CANONNAME | AI_ADDRCONFIG; + ai.ai_flags = AI_CANONNAME; +#ifdef AI_ADDRCONFIG + ai.ai_flags |= AI_ADDRCONFIG; +#endif ai.ai_family = PF_UNSPEC; ai.ai_socktype = SOCK_STREAM; snprintf(port, sizeof(port), "%d", portnr); |