From 6d9f3667bb9c73b775ded64f8ea43f23b5c2d1af Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 2 Jul 2018 21:14:59 -0400 Subject: 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 --- stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stat.c') 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) { -- cgit v1.2.3