summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew W. Nosenko <andrew.w.nosenko@gmail.com>2012-04-13 14:13:07 +0300
committerMartin Sustrik <sustrik@250bpm.com>2012-04-14 05:02:30 +0200
commit3fa9399bc83eebc0a67898328c0e542b764e0c0f (patch)
tree8666ca26c26e639c0471d5f736f200625ce52fd3
parent43965a1080197fcdb69eb48645f01c393171a5fb (diff)
Check for SO_NOSIGPIPE availability instead of OS name
* src/stream_engine.cpp (stream_engine_t::stream_engine_t): Use #ifdef SO_NOSIGPIPE instead of #if defined XS_HAVE_OSX || defined XS_HAVE_FREEBSD
-rw-r--r--src/stream_engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp
index a4df7f3..15b566b 100644
--- a/src/stream_engine.cpp
+++ b/src/stream_engine.cpp
@@ -78,7 +78,7 @@ xs::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_) :
#endif
}
-#if defined XS_HAVE_OSX || defined XS_HAVE_FREEBSD
+#ifdef SO_NOSIGPIPE
// Make sure that SIGPIPE signal is not generated when writing to a
// connection that was already closed by the peer.
int set = 1;