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 2e79bed283..85ae53b561 100644
--- a/file.c
+++ b/file.c
@@ -3101,7 +3101,7 @@ rb_file_truncate(obj, len)
f = GetWriteFile(fptr);
fflush(f);
fseeko(f, (off_t)0, SEEK_CUR);
-#ifdef HAVE_TRUNCATE
+#ifdef HAVE_FTRUNCATE
if (ftruncate(fileno(f), pos) < 0)
rb_sys_fail(fptr->path);
#else