Commit 2c582b68 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Do not translate STATUS_INVALID_PARAMETER to WSAEFAULT.

This fixes a regression introduced by 5c009c17. 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=51493Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cd34be06
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment