$NetBSD: patch-af,v 1.3 2022/04/25 16:19:45 tnn Exp $ --- socket++/sockstream.cpp.orig 2003-03-14 18:26:07.000000000 +0000 +++ socket++/sockstream.cpp @@ -71,6 +71,10 @@ #if defined(__APPLE__) #typedef int socklen_t; #endif +#if defined(__sun) +#include +#include +#endif #ifndef WIN32 EXTERN_C_BEGIN @@ -200,7 +204,7 @@ bool sockerr::op () const case EHOSTDOWN: case EHOSTUNREACH: case ENOTEMPTY: -# if !defined(__linux__) // LN +# if defined(EPROCLIM) case EPROCLIM: # endif case EUSERS: @@ -245,7 +249,7 @@ bool sockerr::benign () const case EWOULDBLOCK: // On FreeBSD (and probably on Linux too) // EAGAIN has the same value as EWOULDBLOCK -#if !defined(__linux__) && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)) // LN +#if !defined(__linux__) && !defined(__sun) && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)) // LN case EAGAIN: #endif return true;