about summary refs log tree commit diff
path: root/io/tst-futimens.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/tst-futimens.c')
-rw-r--r--io/tst-futimens.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/io/tst-futimens.c b/io/tst-futimens.c
index 6204befedd..075ca42b93 100644
--- a/io/tst-futimens.c
+++ b/io/tst-futimens.c
@@ -18,26 +18,23 @@
 
 #include <support/check.h>
 #include <support/xunistd.h>
+#include <fcntl.h>
 #include <sys/stat.h>
 
-#ifndef struct_stat
-# define struct_stat struct stat64
-#endif
-
 static int
 test_futimens_helper (const char *file, int fd, const struct timespec *ts)
 {
   int result = futimens (fd, ts);
   TEST_VERIFY_EXIT (result == 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, ts[0].tv_sec);
+  TEST_COMPARE (st.stx_atime.tv_sec, ts[0].tv_sec);
 
   /* Check if seconds for mtime match */
-  TEST_COMPARE (st.st_mtime, ts[1].tv_sec);
+  TEST_COMPARE (st.stx_mtime.tv_sec, ts[1].tv_sec);
 
   return 0;
 }