about summary refs log tree commit diff
path: root/io/tst-utimensat.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/tst-utimensat.c')
-rw-r--r--io/tst-utimensat.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/io/tst-utimensat.c b/io/tst-utimensat.c
index 0c7c8470bc..062abdd8d3 100644
--- a/io/tst-utimensat.c
+++ b/io/tst-utimensat.c
@@ -22,6 +22,10 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 
+#ifndef struct_stat
+# define struct_stat struct stat64
+#endif
+
 static int
 test_utimesat_helper (const char *testfile, int fd, const char *testlink,
                       const struct timespec *ts)
@@ -29,7 +33,7 @@ test_utimesat_helper (const char *testfile, int fd, const char *testlink,
   {
     TEST_VERIFY_EXIT (utimensat (fd, testfile, ts, 0) == 0);
 
-    struct stat64 st;
+    struct_stat st;
     xfstat (fd, &st);
 
     /* Check if seconds for atime match */
@@ -40,20 +44,20 @@ test_utimesat_helper (const char *testfile, int fd, const char *testlink,
   }
 
   {
-    struct stat64 stfile_orig;
+    struct_stat stfile_orig;
     xlstat (testfile, &stfile_orig);
 
     TEST_VERIFY_EXIT (utimensat (0 /* ignored  */, testlink, ts,
 				 AT_SYMLINK_NOFOLLOW)
 		       == 0);
-    struct stat64 stlink;
+    struct_stat stlink;
     xlstat (testlink, &stlink);
 
     TEST_COMPARE (stlink.st_atime, ts[0].tv_sec);
     TEST_COMPARE (stlink.st_mtime, ts[1].tv_sec);
 
     /* Check if the timestamp from original file is not changed.  */
-    struct stat64 stfile;
+    struct_stat stfile;
     xlstat (testfile, &stfile);
 
     TEST_COMPARE (stfile_orig.st_atime, stfile.st_atime);