From: <hv...@us...> - 2014-11-14 14:54:13
|
Revision: 60239 http://sourceforge.net/p/firebird/code/60239 Author: hvlad Date: 2014-11-14 14:54:09 +0000 (Fri, 14 Nov 2014) Log Message: ----------- Fixed compilation errors on Windows after IPv6 patches Modified Paths: -------------- firebird/trunk/src/remote/SockAddr.h firebird/trunk/src/remote/inet.cpp Modified: firebird/trunk/src/remote/SockAddr.h =================================================================== --- firebird/trunk/src/remote/SockAddr.h 2014-11-14 13:05:53 UTC (rev 60238) +++ firebird/trunk/src/remote/SockAddr.h 2014-11-14 14:54:09 UTC (rev 60239) @@ -33,6 +33,17 @@ #include <netinet/in.h> #endif +#ifdef WIN_NT +#include <winsock2.h> +#include <Ws2tcpip.h> +#include <Wspiapi.h> + +#ifndef IN_LOOPBACKNET +#define IN_LOOPBACKNET 127 +#endif + +#endif + #include "../remote/remote.h" Modified: firebird/trunk/src/remote/inet.cpp =================================================================== --- firebird/trunk/src/remote/inet.cpp 2014-11-14 13:05:53 UTC (rev 60238) +++ firebird/trunk/src/remote/inet.cpp 2014-11-14 14:54:09 UTC (rev 60239) @@ -775,7 +775,11 @@ memset(&gai_hints, 0, sizeof(gai_hints)); gai_hints.ai_family = (packet ? AF_UNSPEC : AF_INET6); gai_hints.ai_socktype = SOCK_STREAM; +#ifndef WIN_NT gai_hints.ai_protocol = SOL_TCP; +#else + gai_hints.ai_protocol = IPPROTO_TCP; +#endif gai_hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG | (packet ? 0 : AI_PASSIVE); const char* host_str = (host.hasData() ? host.c_str() : NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |