ws2_32: Do not translate STATUS_INVALID_PARAMETER to WSAEFAULT.

This fixes a regression introduced by 5c009c17b3.

WeMod WXDrive calls bind() on every local address, but with a zero
sin6_scope_id, and gets confused when this returns WSAEFAULT. Actually this is
supposed to succeed on Windows, but prior to the aforementioned commit we would
return WSAEINVAL, and the program seems to be happy with that.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51493
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-07-21 20:34:52 -05:00 committed by Alexandre Julliard
parent cd34be062c
commit 2c582b683d
1 changed files with 1 additions and 1 deletions

View File

@ -1847,7 +1847,7 @@ int WINAPI WS_bind( SOCKET s, const struct WS_sockaddr *addr, int len )
HeapFree( GetProcessHeap(), 0, params );
HeapFree( GetProcessHeap(), 0, ret_addr );
SetLastError( status == STATUS_INVALID_PARAMETER ? WSAEFAULT : NtStatusToWSAError( status ) );
SetLastError( NtStatusToWSAError( status ) );
return status ? -1 : 0;
}