Added patch to fix return value of WS_select in case of EINTR during timeout.

This commit is contained in:
Michael Müller
2015-03-28 21:31:34 +01:00
parent cd5078fa95
commit 9cfd7972d9
5 changed files with 50 additions and 1 deletions

View File

@@ -236,6 +236,7 @@ patch_enable_all ()
enable_ws2_32_APC_Performance="$1"
enable_ws2_32_Connect_Time="$1"
enable_ws2_32_TransmitFile="$1"
enable_ws2_32_WS_select="$1"
enable_ws2_32_WriteWatches="$1"
enable_ws2_32_getaddrinfo="$1"
enable_wtsapi32_EnumerateProcesses="$1"
@@ -767,6 +768,9 @@ patch_enable ()
ws2_32-TransmitFile)
enable_ws2_32_TransmitFile="$2"
;;
ws2_32-WS_select)
enable_ws2_32_WS_select="$2"
;;
ws2_32-WriteWatches)
enable_ws2_32_WriteWatches="$2"
;;
@@ -4699,6 +4703,18 @@ if test "$enable_ws2_32_TransmitFile" -eq 1; then
) >> "$patchlist"
fi
# Patchset ws2_32-WS_select
# |
# | Modified files:
# | * dlls/ws2_32/socket.c
# |
if test "$enable_ws2_32_WS_select" -eq 1; then
patch_apply ws2_32-WS_select/0001-ws2_32-Don-t-return-an-error-in-WS_select-when-EINTR.patch
(
echo '+ { "Michael Müller", "ws2_32: Don'\''t return an error in WS_select when EINTR happens during timeout.", 1 },';
) >> "$patchlist"
fi
# Patchset ws2_32-getaddrinfo
# |
# | This patchset fixes the following Wine bugs:

View File

@@ -0,0 +1,30 @@
From c3996fd61ba65678d9cfefed715a137b697a72a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 28 Mar 2015 20:47:52 +0100
Subject: ws2_32: Don't return an error in WS_select when EINTR happens during
timeout.
---
dlls/ws2_32/socket.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index e7e3de5..d99e566 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -4601,7 +4601,11 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
}
timeout = torig - (tv2.tv_sec * 1000) - (tv2.tv_usec + 999) / 1000;
- if (timeout <= 0) break;
+ if (timeout <= 0)
+ {
+ ret = 0;
+ break;
+ }
} else break;
}
release_poll_fds( ws_readfds, ws_writefds, ws_exceptfds, pollfds );
--
2.1.0

View File

@@ -0,0 +1 @@
Fixes: Don't return an error in WS_select when EINTR happens during timeout