[1/5] ws2_32: Add a workaround for broken versions of glibc which return EAI_SYSTEM and set errno to 0 instead returning of EAI_NONAME.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Dec 11 02:01:02 CST 2013
https://bugzilla.redhat.com/show_bug.cgi?id=958652
https://sourceware.org/bugzilla/show_bug.cgi?id=15339
---
dlls/ws2_32/socket.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 304b0eb..5cdd27a 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5370,6 +5370,14 @@ static int convert_eai_u2w(int unixret) {
for (i=0;ws_eai_map[i][0];i++)
if (ws_eai_map[i][1] == unixret)
return ws_eai_map[i][0];
+
+ if (unixret == EAI_SYSTEM)
+ /* There are broken versions of glibc which return EAI_SYSTEM
+ * and set errno to 0 instead of returning EAI_NONAME.
+ */
+ return errno ? sock_get_error( errno ) : WS_EAI_NONAME;
+
+ FIXME("Unhandled unix EAI_xxx ret %d\n", unixret);
return unixret;
}
--
1.8.5.1
More information about the wine-patches
mailing list