aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--win32/win32.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a977e3eea4..299a69a266 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Nov 19 13:57:58 2015 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (finish_overlapped_socket): ignore EMSGSIZE when input,
+ because POSIX platforms just do so. fixes test errors revealed by
+ r52647.
+
Thu Nov 19 02:52:30 2015 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
diff --git a/win32/win32.c b/win32/win32.c
index 953c916c93..6ebd9e433c 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3276,8 +3276,13 @@ finish_overlapped_socket(BOOL input, SOCKET s, WSAOVERLAPPED *wol, int result, D
default:
if ((err = WSAGetLastError()) == WSAECONNABORTED && !input)
errno = EPIPE;
+ else if (err == WSAEMSGSIZE && input) {
+ result = TRUE;
+ *len = size;
+ break;
+ }
else
- errno = map_errno(WSAGetLastError());
+ errno = map_errno(err);
/* thru */
case WAIT_OBJECT_0 + 1:
/* interrupted */