Commit 63682fd9 authored by David Luyer's avatar David Luyer Committed by Alexandre Julliard

getpeername() and getsockname() return errors in errno not h_errno.

parent e92331ff
......@@ -1037,7 +1037,7 @@ INT WINAPI WINSOCK_getpeername(SOCKET s, struct sockaddr *name,
#endif
return 0;
}
SetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno());
SetLastError(wsaErrno());
}
#ifdef HAVE_IPX
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == AF_IPX) {
......@@ -1103,7 +1103,7 @@ INT WINAPI WINSOCK_getsockname(SOCKET s, struct sockaddr *name,
#endif
return 0;
}
SetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno());
SetLastError(wsaErrno());
}
#ifdef HAVE_IPX
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == AF_IPX) {
......
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