make net.nim compile for osx doc2

This commit is contained in:
Andreas Rumpf
2016-09-08 12:16:59 +02:00
parent 1f6b2c4d11
commit 6699387c9b

View File

@@ -206,7 +206,7 @@ proc newSocket*(fd: SocketHandle, domain: Domain = AF_INET,
result.currPos = 0
# Set SO_NOSIGPIPE on OS X.
when defined(macosx):
when defined(macosx) and not defined(nimdoc):
setSockOptInt(fd, SOL_SOCKET, SO_NOSIGPIPE, 1)
proc newSocket*(domain, sockType, protocol: cint, buffered = true): Socket =