Skip to content

Commit 0a8f9cc

Browse files
committed
Check for statx on Android
Android has Linux's statx, but MACHDEP is "android" on Android, so configure doesn't check for statx on Android. Base the check for statx on ac_sys_system instead, which is "Linux-android" on Android, "Linux" on other Linux distributions, and "AIX" on AIX (which has an incompatible function named statx).
1 parent b2f9fb9 commit 0a8f9cc

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Check ``statx`` availability only in Linux platforms
1+
Check ``statx`` availability only on Linux (including Android).

configure

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5258,10 +5258,11 @@ AC_CHECK_FUNCS([ \
52585258
wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \
52595259
])
52605260

5261-
# Check statx availability in Linux
5262-
if test "$MACHDEP" = "linux"; then
5263-
AC_CHECK_FUNCS([statx])
5264-
fi
5261+
# os.statx uses Linux's statx function. AIX also has a function named statx,
5262+
# but it's unrelated. Check only on Linux (including Android).
5263+
AS_CASE([$ac_sys_system],
5264+
[Linux*], [AC_CHECK_FUNCS([statx])]
5265+
)
52655266

52665267
# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
52675268
# links. Some libc implementations have a stub lchmod implementation that always

0 commit comments

Comments
 (0)