about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ftruncate64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/ftruncate64.c')
-rw-r--r--sysdeps/unix/sysv/linux/ftruncate64.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c
index 47df34ec7e..49133e8dd0 100644
--- a/sysdeps/unix/sysv/linux/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/ftruncate64.c
@@ -26,7 +26,10 @@
 #include "kernel-features.h"
 
 #ifdef __NR_ftruncate64
-static int have_no_ftruncate64;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls.  */
+extern int have_no_truncate64;
+#endif
 
 extern int __syscall_ftruncate64 (int fd, int high_length, int low_length);
 
@@ -38,7 +41,7 @@ ftruncate64 (fd, length)
      off64_t length;
 {
 #ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! have_no_ftruncate64)
+  if (! have_no_truncate64)
 #endif
     {
       unsigned int low = length & 0xffffffff;
@@ -55,7 +58,7 @@ ftruncate64 (fd, length)
 
 #ifndef __ASSUME_TRUNCATE64_SYSCALL
       __set_errno (saved_errno);
-      have_no_ftruncate64 = 1;
+      have_no_truncate64 = 1;
 #endif
     }