sockets.nim: bugfix for solaris

This commit is contained in:
Araq
2012-11-20 21:40:22 +01:00
parent b4ad97a036
commit 67d9933eb3

View File

@@ -1297,6 +1297,8 @@ proc send*(socket: TSocket, data: pointer, size: int): int {.
when defined(windows) or defined(macosx):
result = send(socket.fd, data, size.cint, 0'i32)
else:
when not defined(MSG_NOSIGNAL):
const MSG_NOSIGNAL = 0
result = send(socket.fd, data, size, int32(MSG_NOSIGNAL))
proc send*(socket: TSocket, data: string) {.tags: [FWriteIO].} =