sockets.nim: bugfix for solaris

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

View file

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