summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-07-02 21:14:59 -0400
committerTavian Barnes <tavianator@tavianator.com>2018-07-02 21:16:15 -0400
commit6d9f3667bb9c73b775ded64f8ea43f23b5c2d1af (patch)
tree283e0baa5277a4b00caa1fcf6b26b2080bab9b0d
parent8ea91a14b24714517e8aafcd59fd774ed7354ecb (diff)
downloadbfs-6d9f3667bb9c73b775ded64f8ea43f23b5c2d1af.tar.xz
stat: Don't try to statx() on architectures without the syscall
Turns out that ia64 and sh4 define all the structures and constants, but don't actually support the statx() system call itself. So instead of testing for the constants, just test for the syscall number directly. Should fix: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=ia64&ver=1.2.2-1&stamp=1529917943&raw=0 https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=sh4&ver=1.2.2-1&stamp=1529917893&raw=0
-rw-r--r--stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stat.c b/stat.c
index 4f1c2fc..3b90d04 100644
--- a/stat.c
+++ b/stat.c
@@ -108,7 +108,7 @@ static int bfs_stat_impl(int at_fd, const char *at_path, int at_flags, enum bfs_
return ret;
}
-#ifdef STATX_BASIC_STATS
+#ifdef __NR_statx
/**
* Wrapper for the statx() system call, which has no native glibc wrapper.
@@ -213,7 +213,7 @@ static int bfs_statx_impl(int at_fd, const char *at_path, int at_flags, enum bfs
#endif // STATX_BASIC_STATS
int bfs_stat(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flag flags, struct bfs_stat *buf) {
-#ifdef STATX_BASIC_STATS
+#ifdef __NR_statx
static bool has_statx = true;
if (has_statx) {