summaryrefslogtreecommitdiffstats
path: root/src/stat.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-10-18 11:34:31 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-10-18 11:34:31 -0400
commiteb47b3c51ad7e321563d70ff142f47cedf8830bc (patch)
tree59657db49d8576b87aa32e0c8a9a1c43339b7968 /src/stat.c
parent7590d382ffa4795af106cf05ab2e619e11b4cf30 (diff)
downloadbfs-eb47b3c51ad7e321563d70ff142f47cedf8830bc.tar.xz
stat: Check Android API level for statx() support
Bionic's <sys/stat.h> can define STATX_BASIC_STATS without declaring statx() on lower API levels, so explicitly check for the version it was added in.
Diffstat (limited to 'src/stat.c')
-rw-r--r--src/stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stat.c b/src/stat.c
index b67ad0e..b172780 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -28,7 +28,7 @@
# include <sys/param.h>
#endif
-#ifdef STATX_BASIC_STATS
+#if defined(STATX_BASIC_STATS) && (!__ANDROID__ || __ANDROID_API__ >= 30)
# define BFS_LIBC_STATX true
#elif __linux__
# include <linux/stat.h>