summaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-11-04 19:27:20 -0700
committerGarrett D'Amore <garrett@damore.org>2017-11-04 19:27:20 -0700
commitcf6527e8a80eb06db23b1fa5b6f0b6c4ff39d181 (patch)
tree94470c0fea954223558d41b539ce472c163d33a3 /src/platform
parent1bc7867caf86cf34233bb1f91537833ea5af0797 (diff)
downloadnng-cf6527e8a80eb06db23b1fa5b6f0b6c4ff39d181.tar.gz
nng-cf6527e8a80eb06db23b1fa5b6f0b6c4ff39d181.tar.bz2
nng-cf6527e8a80eb06db23b1fa5b6f0b6c4ff39d181.zip
Darwin needs to use SO_NOSIGPIPE.
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/posix/posix_pipedesc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/posix/posix_pipedesc.c b/src/platform/posix/posix_pipedesc.c
index e3ef5290..d25a9d96 100644
--- a/src/platform/posix/posix_pipedesc.c
+++ b/src/platform/posix/posix_pipedesc.c
@@ -333,10 +333,10 @@ nni_posix_pipedesc_init(nni_posix_pipedesc **pdp, int fd)
(void) fcntl(fd, F_SETFL, O_NONBLOCK);
-#ifdef SO_NOSIGNAL
+#ifdef SO_NOSIGPIPE
// Darwin lacks MSG_NOSIGNAL, but has a socket option.
int one = 1;
- (void) setsockopt(fd, SOL_SOCKET, SO_NOSIGNAL, &one, sizeof(one));
+ (void) setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &one, sizeof(one));
#endif
nni_mtx_init(&pd->mtx);