--- boost/asio/detail/impl/socket_ops.ipp.orig 2016-09-29 01:53:04.968088000 +0200 +++ boost/asio/detail/impl/socket_ops.ipp 2016-09-29 01:53:37.991808000 +0200 @@ -115,7 +115,7 @@ if (new_s == invalid_socket) return new_s; -#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) || defined(__BSDSUniX__) int optval = 1; int result = error_wrapper(::setsockopt(new_s, SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec); @@ -1360,7 +1360,7 @@ ec = boost::system::error_code(); return s; -#elif defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) +#elif defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) || defined(__BSDSUniX__) socket_type s = error_wrapper(::socket(af, type, protocol), ec); if (s == invalid_socket) return s; @@ -1453,7 +1453,7 @@ ec = boost::system::error_code(); #if defined(__MACH__) && defined(__APPLE__) \ - || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) + || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__BSDSUniX__) // To implement portable behaviour for SO_REUSEADDR with UDP sockets we // need to also set SO_REUSEPORT on BSD-based platforms. if ((state & datagram_oriented) @@ -1671,7 +1671,7 @@ #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) int result = error_wrapper(::ioctlsocket(s, cmd, arg), ec); #elif defined(__MACH__) && defined(__APPLE__) \ - || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) + || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__BSDSUniX__) int result = error_wrapper(::ioctl(s, static_cast(cmd), arg), ec); #else