summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-03-03 16:11:48 +0100
committerAlexander Larsson <alexl@redhat.com>2010-03-03 16:14:19 +0100
commit2d203bc428c9006c47e3936cb6e3190e17d8431a (patch)
treee445a4531877648c8cdc0dd922be2f7cf927026e /client
parentd425690875dd5c74a8c6fe1b990f61c4343b5a22 (diff)
downloadspice-2d203bc428c9006c47e3936cb6e3190e17d8431a.tar.gz
spice-2d203bc428c9006c47e3936cb6e3190e17d8431a.tar.xz
spice-2d203bc428c9006c47e3936cb6e3190e17d8431a.zip
Only use AI_ADDRCONF if availible
AI_ADDRCONF not availible on winXP, so this fixes windows build.
Diffstat (limited to 'client')
-rw-r--r--client/red_peer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/red_peer.cpp b/client/red_peer.cpp
index ce6ec0ec..5d939a4d 100644
--- a/client/red_peer.cpp
+++ b/client/red_peer.cpp
@@ -78,7 +78,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);