From 2dcbe1473b17edbb99af1d51c518ff116e4c9cd5 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 7 Aug 2010 06:28:00 +0000 Subject: [PATCH] - stupid win32 compile fix for sockets --- source/shared_lib/sources/platform/posix/socket.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 227d89c44..09b2d5632 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -33,6 +33,8 @@ #include #include +#define MSG_NOSIGNAL 0 + #else #include @@ -981,7 +983,8 @@ int Socket::send(const void *data, int dataSize) { MutexSafeWrapper safeMutex(&dataSynchAccessor); //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); - bytesSent = ::send(sock, data, dataSize, MSG_NOSIGNAL); + + bytesSent = ::send(sock, (const char *)data, dataSize, MSG_NOSIGNAL); //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); } @@ -1008,7 +1011,7 @@ int Socket::send(const void *data, int dataSize) { SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] attemptCount = %d, sock = %d, dataSize = %d, data = %p\n",__FILE__,__FUNCTION__,__LINE__,attemptCount,sock,dataSize,data); MutexSafeWrapper safeMutex(&dataSynchAccessor); - bytesSent = ::send(sock, data, dataSize, MSG_NOSIGNAL); + bytesSent = ::send(sock, (const char *)data, dataSize, MSG_NOSIGNAL); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] #2 EAGAIN during send, trying again returned: %d\n",__FILE__,__FUNCTION__,bytesSent); }