about summary refs log tree commit diff
path: root/io/tst-futimes.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/tst-futimes.c')
-rw-r--r--io/tst-futimes.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/io/tst-futimes.c b/io/tst-futimes.c
index d21acf6a24..612fe460cf 100644
--- a/io/tst-futimes.c
+++ b/io/tst-futimes.c
@@ -18,27 +18,24 @@
 
 #include <support/check.h>
 #include <support/xunistd.h>
+#include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 
-#ifndef struct_stat
-# define struct_stat struct stat64
-#endif
-
 static int
 test_futimens_helper (const char *file, int fd, const struct timeval *tv)
 {
   int r = futimes (fd, tv);
   TEST_VERIFY_EXIT (r == 0);
 
-  struct_stat st;
-  xfstat (fd, &st);
+  struct statx st;
+  xstatx (fd, "", AT_EMPTY_PATH, STATX_BASIC_STATS, &st);
 
   /* Check if seconds for atime match */
-  TEST_COMPARE (st.st_atime, tv[0].tv_sec);
+  TEST_COMPARE (st.stx_atime.tv_sec, tv[0].tv_sec);
 
   /* Check if seconds for mtime match */
-  TEST_COMPARE (st.st_mtime, tv[1].tv_sec);
+  TEST_COMPARE (st.stx_mtime.tv_sec, tv[1].tv_sec);
 
   return 0;
 }