diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-03-03 16:11:48 +0100 |
---|---|---|
committer | Uri Lublin <uril@redhat.com> | 2010-03-18 14:21:08 +0200 |
commit | 6108a6ce5f74c1d466b6ab3e453f2ecbd2dd5a9d (patch) | |
tree | 45a3e805cfcc7a6c585e6ff4850ac78f2b812d69 | |
parent | d8af90aa4c04378d7d6d7949db1ab1c2377cfb96 (diff) |
Only use AI_ADDRCONF if availible #566444spice-client-0.4.2-3.el6
AI_ADDRCONF not availible on winXP, so this fixes windows build.
-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); |