From 32043daaafcd59793b9addf7af1bcedb3b666f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= Date: Fri, 28 Apr 2023 14:21:39 +0200 Subject: tests: replace ftruncate by xftruncate With fortification enabled, ftruncate calls return result needs to be checked, has it gets the __wur macro enabled. Reviewed-by: Siddhesh Poyarekar --- stdio-common/tst-perror.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stdio-common') diff --git a/stdio-common/tst-perror.c b/stdio-common/tst-perror.c index 57835e0..b4ab583 100644 --- a/stdio-common/tst-perror.c +++ b/stdio-common/tst-perror.c @@ -9,6 +9,7 @@ #include #include +#include #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) { -- cgit v1.1