[Spice-commits] client/red_peer.cpp

Alexander Larsson alexl at kemper.freedesktop.org
Wed Mar 3 07:16:50 PST 2010


 client/red_peer.cpp |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2d203bc428c9006c47e3936cb6e3190e17d8431a
Author: Alexander Larsson <alexl at redhat.com>
Date:   Wed Mar 3 16:11:48 2010 +0100

    Only use AI_ADDRCONF if availible
    
    AI_ADDRCONF not availible on winXP, so this fixes windows build.

diff --git a/client/red_peer.cpp b/client/red_peer.cpp
index ce6ec0e..5d939a4 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);


More information about the Spice-commits mailing list