aboutsummaryrefslogtreecommitdiff
path: root/src/util/network.c
diff options
context:
space:
mode:
authorHeikki Lindholm <holin@iki.fi>2009-10-17 20:58:41 +0000
committerHeikki Lindholm <holin@iki.fi>2009-10-17 20:58:41 +0000
commit2936a30e0ae70b8d1a984914f93113716a8bc620 (patch)
treec93b9a86ae926922e573e1cfa0450dfdc327ee88 /src/util/network.c
parent32219472d9ad7f60a82b3c68cd61115bfc1e3ad7 (diff)
downloadgnunet-2936a30e0ae70b8d1a984914f93113716a8bc620.tar.gz
gnunet-2936a30e0ae70b8d1a984914f93113716a8bc620.zip
OS X version of MSG_NOSIGNAL
Diffstat (limited to 'src/util/network.c')
-rw-r--r--src/util/network.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/network.c b/src/util/network.c
index 9a38dc098..5ba849138 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -333,6 +333,13 @@ GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle * desc,
333{ 333{
334 int ret; 334 int ret;
335 int flags; 335 int flags;
336#ifdef OSX
337 int no_sigpipe;
338 no_sigpipe = 1;
339 /* shouldn't matter if this fails as there's a SIGPIPE handler */
340 ret = setsockopt (desc->fd, SOL_SOCKET, SO_NOSIGPIPE,
341 (void *) &no_sigpipe, sizeof (no_sigpipe));
342#endif
336 343
337 flags = 0; 344 flags = 0;
338#ifdef MSG_DONTWAIT 345#ifdef MSG_DONTWAIT
@@ -370,6 +377,13 @@ GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle * desc,
370{ 377{
371 int ret; 378 int ret;
372 int flags; 379 int flags;
380#ifdef OSX
381 int no_sigpipe;
382 no_sigpipe = 1;
383 /* shouldn't matter if this fails as there's a SIGPIPE handler */
384 ret = setsockopt (desc->fd, SOL_SOCKET, SO_NOSIGPIPE,
385 (void *) &no_sigpipe, sizeof (no_sigpipe));
386#endif
373 387
374 flags = 0; 388 flags = 0;
375#ifdef MSG_DONTWAIT 389#ifdef MSG_DONTWAIT