gh-140239: Check for statx on Android (#140395)

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).
This commit is contained in:
Jeffrey Bosboom
2025-10-21 08:54:00 -07:00
committed by GitHub
parent 0c01090ad9
commit c788bfb80e
3 changed files with 15 additions and 9 deletions

13
configure generated vendored
View File

@@ -20392,16 +20392,21 @@ then :
fi
# Check statx availability in Linux
if test "$MACHDEP" = "linux"; then
ac_fn_c_check_func "$LINENO" "statx" "ac_cv_func_statx"
# os.statx uses Linux's statx function. AIX also has a function named statx,
# but it's unrelated. Check only on Linux (including Android).
case $ac_sys_system in #(
Linux*) :
ac_fn_c_check_func "$LINENO" "statx" "ac_cv_func_statx"
if test "x$ac_cv_func_statx" = xyes
then :
printf "%s\n" "#define HAVE_STATX 1" >>confdefs.h
fi
fi
;; #(
*) :
;;
esac
# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
# links. Some libc implementations have a stub lchmod implementation that always