--- boost/asio/detail/impl/socket_ops.ipp.orig 2019-04-09 21:35:20.000000000 +0200 +++ boost/asio/detail/impl/socket_ops.ipp 2019-04-28 04:52:40.153893000 +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); @@ -1410,7 +1410,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; @@ -1504,7 +1504,8 @@ #if defined(__MACH__) && defined(__APPLE__) \ || defined(__NetBSD__) || defined(__FreeBSD__) \ - || defined(__OpenBSD__) || defined(__QNX__) + || defined(__OpenBSD__) || defined(__QNX__) \ + || 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) @@ -1725,7 +1726,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