summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-08-30 13:04:05 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-08-30 13:07:18 -0400
commit1b79831aa6af05807bed5fb2e864b250877e1fe1 (patch)
tree6fc1628e6c9389fc6f9bf5c447c017875fd87b9f
parent7e54db178afde65edea15787f47ee94d2a88f416 (diff)
downloadbfs-1b79831aa6af05807bed5fb2e864b250877e1fe1.tar.xz
stat: Check that AT_STATX_DONT_SYNC exists before using it
-rw-r--r--stat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/stat.c b/stat.c
index 1e2f019..cefefd6 100644
--- a/stat.c
+++ b/stat.c
@@ -300,9 +300,12 @@ int bfs_stat(int at_fd, const char *at_path, enum bfs_stat_flag flags, struct bf
if (flags & BFS_STAT_NOFOLLOW) {
at_flags |= AT_SYMLINK_NOFOLLOW;
}
+
+#ifdef AT_STATX_DONT_SYNC
if (flags & BFS_STAT_NOSYNC) {
at_flags |= AT_STATX_DONT_SYNC;
}
+#endif
if (at_path) {
return bfs_stat_explicit(at_fd, at_path, at_flags, flags, buf);