aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io.c b/io.c
index 290e8b1de3..fb6b95da88 100644
--- a/io.c
+++ b/io.c
@@ -2474,6 +2474,11 @@ read_all(rb_io_t *fptr, long siz, VALUE str)
void
rb_io_set_nonblock(rb_io_t *fptr)
{
+#ifdef _WIN32
+ if (rb_w32_set_nonblock(fptr->fd) != 0) {
+ rb_sys_fail_path(fptr->pathv);
+ }
+#else
int oflags;
#ifdef F_GETFL
oflags = fcntl(fptr->fd, F_GETFL);
@@ -2489,6 +2494,7 @@ rb_io_set_nonblock(rb_io_t *fptr)
rb_sys_fail_path(fptr->pathv);
}
}
+#endif
}
void