summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index ffd1c72895..ebc9031150 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -43,9 +43,9 @@ VALUE
rsock_init_sock(VALUE sock, int fd)
{
rb_io_t *fp;
+#ifndef _WIN32
struct stat sbuf;
-#ifndef _WIN32
if (fstat(fd, &sbuf) < 0)
rb_sys_fail(0);
if (!S_ISSOCK(sbuf.st_mode))