summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index efa9cf9dbe..3a2555d214 100644
--- a/file.c
+++ b/file.c
@@ -3173,7 +3173,7 @@ rb_file_truncate(VALUE obj, VALUE len)
rb_raise(rb_eIOError, "not opened for writing");
}
rb_io_flush(obj);
-#ifdef HAVE_TRUNCATE
+#ifdef HAVE_FTRUNCATE
if (ftruncate(fptr->fd, pos) < 0)
rb_sys_fail(fptr->path);
#else