mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #5835 from mattn/windows-errno
use WSAGetLastError() for errno on Windows
This commit is contained in:
@@ -1268,8 +1268,13 @@ mrb_io_s_select(mrb_state *mrb, mrb_value klass)
|
||||
retry:
|
||||
n = select(max, rp, wp, ep, tp);
|
||||
if (n < 0) {
|
||||
#ifdef _WIN32
|
||||
if (WSAGetLastError() != WSAEINTR)
|
||||
mrb_sys_fail(mrb, "select failed");
|
||||
#else
|
||||
if (errno != EINTR)
|
||||
mrb_sys_fail(mrb, "select failed");
|
||||
#endif
|
||||
if (tp == NULL)
|
||||
goto retry;
|
||||
interrupt_flag = 1;
|
||||
|
||||
Reference in New Issue
Block a user