aboutsummaryrefslogtreecommitdiff
path: root/src/include/port-sockets.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/port-sockets.h')
-rw-r--r--src/include/port-sockets.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/port-sockets.h b/src/include/port-sockets.h
index b3ab9c9..f0fc2b8 100644
--- a/src/include/port-sockets.h
+++ b/src/include/port-sockets.h
@@ -40,8 +40,9 @@ typedef WSABUF sg_buf;
*/
/* WSASend returns 0 or SOCKET_ERROR. */
#define SOCKET_WRITEV_TEMP DWORD
-#define SOCKET_WRITEV(FD, SG, LEN, TMP) \
- (WSASend((FD), (SG), (LEN), &(TMP), 0, 0, 0) ? -1 : (TMP))
+#define SOCKET_WRITEV(FD, SG, LEN, TMP) \
+ (WSASend((FD), (SG), (LEN), &(TMP), 0, 0, 0) ? \
+ (ssize_t)-1 : (ssize_t)(TMP))
#define SHUTDOWN_READ SD_RECEIVE
#define SHUTDOWN_WRITE SD_SEND