Skip to content

Commit

Permalink
stat: Check Android API level for statx() support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tavianator committed Oct 18, 2022
1 parent 7590d38 commit eb47b3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit eb47b3c

Please sign in to comment.