MSG_NOSIGNAL not defined on mac os x

This commit is contained in:
Eric Doughty-Papassideris
2012-01-21 15:52:04 +01:00
parent e92693ec8d
commit 1602e8e2f4

View File

@@ -625,7 +625,7 @@ proc skip*(socket: TSocket) =
proc send*(socket: TSocket, data: pointer, size: int): int =
## sends data to a socket.
when defined(windows):
when defined(windows) or defined(macosx):
result = send(cint(socket), data, size, 0'i32)
else:
result = send(cint(socket), data, size, int32(MSG_NOSIGNAL))