mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-15 23:54:19 +00:00
MSG_NOSIGNAL not defined on mac os x
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user