Brendan McGrath <brendan(a)redmandi.com> writes:
@@ -7646,8 +7646,19 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, /* invalid combination of valid parameters, like SOCK_STREAM + IPPROTO_UDP */ if (err == WSAEINVAL) err = WSAESOCKTNOSUPPORT; - else if (err == WSAEOPNOTSUPP) - err = WSAEPROTONOSUPPORT; + else if (err == WSAEOPNOTSUPP) { + if (unixtype == SOCK_STREAM && protocol == IPPROTO_TCP && + (unixaf == AF_INET || unixaf == AF_INET6)) + err = WSAEAFNOSUPPORT; + else if (unixtype == SOCK_DGRAM && protocol == IPPROTO_IP && + (unixaf == AF_INET || unixaf == AF_INET6)) + err = WSAEAFNOSUPPORT; + else if (unixtype == SOCK_DGRAM && protocol == IPPROTO_IPV6 && + unixaf == AF_INET6) + err = WSAEAFNOSUPPORT; + else + err = WSAEPROTONOSUPPORT; + }
I'd suggest to find a way to return the specific error from the server, instead of mapping everything to the same error on the server side and trying to guess the specific error afterwards. -- Alexandre Julliard julliard(a)winehq.org