about summary refs log tree commit diff
path: root/stdio-common/tst-perror.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tst-perror.c')
-rw-r--r--stdio-common/tst-perror.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdio-common/tst-perror.c b/stdio-common/tst-perror.c
index 57835e0c59..b4ab583462 100644
--- a/stdio-common/tst-perror.c
+++ b/stdio-common/tst-perror.c
@@ -9,6 +9,7 @@
 #include <unistd.h>
 #include <wchar.h>
 
+#include <support/xunistd.h>
 
 #define MB_EXP \
   "null mode test 1: Invalid or incomplete multibyte or wide character\n" \
@@ -94,7 +95,7 @@ do_test (void)
     puts ("multibyte test succeeded");
 
   lseek (fd, 0, SEEK_SET);
-  ftruncate (fd, 0);
+  xftruncate (fd, 0);
 
   if (dup2 (fd, 2) == -1)
     {