From f8823de7d38108d3fa5893b68ad6e6ae4811512c Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Thu, 14 Aug 2014 13:04:47 -0230 Subject: Changed check for TCP fast path to not rely on WIN32_WINNRT --- cpp/src/Ice/Network.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 336446d7571..4a143e83618 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -58,10 +58,7 @@ extern "C" #endif #if defined(_WIN32) && !defined(ICE_OS_WINRT) -# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x602) -# include -# define HAS_LOOPBACK_FAST_PATH 1 -# endif +# define HAS_LOOPBACK_FAST_PATH 1 #endif using namespace std; @@ -152,6 +149,10 @@ setKeepAlive(SOCKET fd) void setTcpLoopbackFastPath(SOCKET fd) { + // We define SIO_LOOPBACK_FAST_PATH ourselves rather than get it from mstcpip.h since + // code needs to compile on platforms that do not support this feature. On those platforms + // the WSAIoctl call will just return WSAEOPNOTSUPP. + const int SIO_LOOPBACK_FAST_PATH = (-1744830448); int OptionValue = 1; DWORD NumberOfBytesReturned = 0; int status = -- cgit v1.2.3