diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index 325954ec3e..b54ab744f8 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -6547,7 +6547,7 @@ rb_w32_write(int fd, const void *buf, size_t size) if (!GetOverlappedResult((HANDLE)_osfhnd(fd), &ol, &written, TRUE)) { - errno = map_errno(err); + errno = map_errno(GetLastError()); CloseHandle(ol.hEvent); cancel_io((HANDLE)_osfhnd(fd)); MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fd)->lock)); |