]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-140239: Check statx availability only on Linux (#140249)
authorAyappan Perumal <ayappap2@in.ibm.com>
Fri, 17 Oct 2025 17:40:16 +0000 (23:10 +0530)
committerGitHub <noreply@github.com>
Fri, 17 Oct 2025 17:40:16 +0000 (19:40 +0200)
Misc/NEWS.d/next/Build/2025-10-17-11-33-45.gh-issue-140239._k-GgW.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2025-10-17-11-33-45.gh-issue-140239._k-GgW.rst b/Misc/NEWS.d/next/Build/2025-10-17-11-33-45.gh-issue-140239._k-GgW.rst
new file mode 100644 (file)
index 0000000..f196ab0
--- /dev/null
@@ -0,0 +1 @@
+Check ``statx`` availability only in Linux platforms
index 267981250cd7e2833de65c94ce55b0108c206592..3ea9c1044316c2b2dbd29163b1ac99dc6fc289a8 100755 (executable)
--- a/configure
+++ b/configure
@@ -20191,12 +20191,6 @@ if test "x$ac_cv_func_splice" = xyes
 then :
   printf "%s\n" "#define HAVE_SPLICE 1" >>confdefs.h
 
-fi
-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
 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
 if test "x$ac_cv_func_strftime" = xyes
@@ -20398,6 +20392,17 @@ then :
 fi
 
 
+# Check statx availability in Linux
+if test "$MACHDEP" = "linux"; then
+  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
+
 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
 # links. Some libc implementations have a stub lchmod implementation that always
 # returns an error.
index 382591952ef68fe357cde24bbe429f2ddad8fe1f..8c920da1997155d148b61755eb023035f5ec015c 100644 (file)
@@ -5251,12 +5251,17 @@ AC_CHECK_FUNCS([ \
   setitimer setlocale setpgid setpgrp setpriority setregid setresgid \
   setresuid setreuid setsid setuid setvbuf shutdown sigaction sigaltstack \
   sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \
-  sigwaitinfo snprintf splice statx strftime strlcpy strsignal symlinkat sync \
+  sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
   sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \
   tmpnam tmpnam_r truncate ttyname_r umask uname unlinkat unlockpt utimensat utimes vfork \
   wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \
 ])
 
+# Check statx availability in Linux
+if test "$MACHDEP" = "linux"; then
+  AC_CHECK_FUNCS([statx])
+fi
+
 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
 # links. Some libc implementations have a stub lchmod implementation that always
 # returns an error.