MSG_NOSIGNAL not defined on mac os x

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

View file

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