summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2015-08-27 09:56:17 +0900
committerTomoyuki Sahara <[email protected]>2015-08-27 09:56:17 +0900
commit5fa3c39145d9d8126d0eb9020c6ac660560d32ce (patch)
treec29c517ea6ad68fc2a735612e38053ba23383100 /src
parent6c4d39412f693301eca34daf7a413248839be404 (diff)
downloadmruby-5fa3c39145d9d8126d0eb9020c6ac660560d32ce.tar.gz
mruby-5fa3c39145d9d8126d0eb9020c6ac660560d32ce.zip
variables are not used on the platforms lack FD_CLOEXEC.
Diffstat (limited to 'src')
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 1d2f98f3c..64403a75a 100644
--- a/src/io.c
+++ b/src/io.c
@@ -128,9 +128,9 @@ mrb_io_flags_to_modenum(mrb_state *mrb, int flags)
void
mrb_fd_cloexec(mrb_state *mrb, int fd)
{
+#if defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
int flags, flags2;
-#if defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
flags = fcntl(fd, F_GETFD);
if (flags == -1) {
mrb_sys_fail(mrb, "fcntl");