--- dlls/ws2_32/socket.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index df068fe..ea87a7a 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -5770,6 +5770,15 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, return SOCKET_ERROR; }
+#ifdef __APPLE__ + if(level == WS_SOL_SOCKET && optname == WS_SO_SNDBUF && + optval && *(const int*)optval == 0) + { + WARN("Setting SO_SNDBUF to 0: ignored\n"); + return 0; + } +#endif + switch(level) { case WS_SOL_SOCKET: