aboutsummaryrefslogtreecommitdiff
path: root/io/tst-stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/tst-stat.c')
-rw-r--r--io/tst-stat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/io/tst-stat.c b/io/tst-stat.c
index 445ac4176c..397d480ecc 100644
--- a/io/tst-stat.c
+++ b/io/tst-stat.c
@@ -91,9 +91,12 @@ do_test (void)
TEST_COMPARE (stx.stx_blocks, st.st_blocks);
TEST_COMPARE (stx.stx_ctime.tv_sec, st.st_ctim.tv_sec);
- TEST_COMPARE (stx.stx_ctime.tv_nsec, st.st_ctim.tv_nsec);
TEST_COMPARE (stx.stx_mtime.tv_sec, st.st_mtim.tv_sec);
- TEST_COMPARE (stx.stx_mtime.tv_nsec, st.st_mtim.tv_nsec);
+ if (support_stat_nanoseconds ())
+ {
+ TEST_COMPARE (stx.stx_ctime.tv_nsec, st.st_ctim.tv_nsec);
+ TEST_COMPARE (stx.stx_mtime.tv_nsec, st.st_mtim.tv_nsec);
+ }
}
return 0;