https://github.com/python/cpython/commit/9f36d8577642102675994fe8da743ee41557f004
commit: 9f36d8577642102675994fe8da743ee41557f004
branch: 3.14
author: Vasiliy Kiryanov <[email protected]>
committer: vstinner <[email protected]>
date: 2026-11-05T01:04:31Z
summary:
[3.14] gh-75929: Fix configure function checks under -Wall -Werror (GH-161343)
(#161372)
Use `(void)$1` in `PY_CHECK_FUNC` instead of declaring an unused
variable. The unused-variable warning caused configure to report
declared functions such as `fchdir` as missing.
(cherry picked from commit 341f80e81a185c48ebbb2c0115401edf99f59baa)
files:
A Misc/NEWS.d/next/Build/2026-11-04-14-37-13.gh-issue-75929.nELdwE.rst
M configure
M configure.ac
diff --git
a/Misc/NEWS.d/next/Build/2026-11-04-14-37-13.gh-issue-75929.nELdwE.rst
b/Misc/NEWS.d/next/Build/2026-11-04-14-37-13.gh-issue-75929.nELdwE.rst
new file mode 100644
index 000000000000000..8ec7f8a0147399f
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-11-04-14-37-13.gh-issue-75929.nELdwE.rst
@@ -0,0 +1,2 @@
+Fix a ``configure`` probe that could omit functions such
+as :func:`os.fchdir` from builds using ``-Wall -Werror``.
diff --git a/configure b/configure
index 1a00f44916b51a6..87e29199002661b 100755
--- a/configure
+++ b/configure
@@ -15758,7 +15758,7 @@ else case e in #(
int
main (void)
{
-void *x=ffi_prep_cif_var
+(void)ffi_prep_cif_var
;
return 0;
}
@@ -15799,7 +15799,7 @@ else case e in #(
int
main (void)
{
-void *x=ffi_prep_closure_loc
+(void)ffi_prep_closure_loc
;
return 0;
}
@@ -15840,7 +15840,7 @@ else case e in #(
int
main (void)
{
-void *x=ffi_closure_alloc
+(void)ffi_closure_alloc
;
return 0;
}
@@ -20605,7 +20605,7 @@ else case e in #(
int
main (void)
{
-void *x=strerror_r
+(void)strerror_r
;
return 0;
}
@@ -20799,7 +20799,7 @@ else case e in #(
int
main (void)
{
-void *x=chroot
+(void)chroot
;
return 0;
}
@@ -20840,7 +20840,7 @@ else case e in #(
int
main (void)
{
-void *x=link
+(void)link
;
return 0;
}
@@ -20881,7 +20881,7 @@ else case e in #(
int
main (void)
{
-void *x=symlink
+(void)symlink
;
return 0;
}
@@ -20922,7 +20922,7 @@ else case e in #(
int
main (void)
{
-void *x=fchdir
+(void)fchdir
;
return 0;
}
@@ -20963,7 +20963,7 @@ else case e in #(
int
main (void)
{
-void *x=fsync
+(void)fsync
;
return 0;
}
@@ -21004,7 +21004,7 @@ else case e in #(
int
main (void)
{
-void *x=fdatasync
+(void)fdatasync
;
return 0;
}
@@ -21045,7 +21045,7 @@ else case e in #(
int
main (void)
{
-void *x=epoll_create
+(void)epoll_create
;
return 0;
}
@@ -21086,7 +21086,7 @@ else case e in #(
int
main (void)
{
-void *x=epoll_create1
+(void)epoll_create1
;
return 0;
}
@@ -21130,7 +21130,7 @@ else case e in #(
int
main (void)
{
-void *x=kqueue
+(void)kqueue
;
return 0;
}
@@ -21174,7 +21174,7 @@ else case e in #(
int
main (void)
{
-void *x=prlimit
+(void)prlimit
;
return 0;
}
@@ -21216,7 +21216,7 @@ else case e in #(
int
main (void)
{
-void *x=_dyld_shared_cache_contains_path
+(void)_dyld_shared_cache_contains_path
;
return 0;
}
@@ -21265,7 +21265,7 @@ else case e in #(
int
main (void)
{
-void *x=memfd_create
+(void)memfd_create
;
return 0;
}
@@ -21311,7 +21311,7 @@ else case e in #(
int
main (void)
{
-void *x=eventfd
+(void)eventfd
;
return 0;
}
@@ -21357,7 +21357,7 @@ else case e in #(
int
main (void)
{
-void *x=timerfd_create
+(void)timerfd_create
;
return 0;
}
@@ -21405,7 +21405,7 @@ else case e in #(
int
main (void)
{
-void *x=ctermid_r
+(void)ctermid_r
;
return 0;
}
@@ -21544,7 +21544,7 @@ else case e in #(
int
main (void)
{
-void *x=getpagesize
+(void)getpagesize
;
return 0;
}
@@ -23251,7 +23251,7 @@ else case e in #(
int
main (void)
{
-void *x=hstrerror
+(void)hstrerror
;
return 0;
}
@@ -23292,7 +23292,7 @@ else case e in #(
int
main (void)
{
-void *x=getservbyname
+(void)getservbyname
;
return 0;
}
@@ -23333,7 +23333,7 @@ else case e in #(
int
main (void)
{
-void *x=getservbyport
+(void)getservbyport
;
return 0;
}
@@ -23374,7 +23374,7 @@ else case e in #(
int
main (void)
{
-void *x=gethostbyname
+(void)gethostbyname
;
return 0;
}
@@ -23415,7 +23415,7 @@ else case e in #(
int
main (void)
{
-void *x=gethostbyaddr
+(void)gethostbyaddr
;
return 0;
}
@@ -23456,7 +23456,7 @@ else case e in #(
int
main (void)
{
-void *x=getprotobyname
+(void)getprotobyname
;
return 0;
}
@@ -23505,7 +23505,7 @@ else case e in #(
int
main (void)
{
-void *x=inet_aton
+(void)inet_aton
;
return 0;
}
@@ -23551,7 +23551,7 @@ else case e in #(
int
main (void)
{
-void *x=inet_ntoa
+(void)inet_ntoa
;
return 0;
}
@@ -23597,7 +23597,7 @@ else case e in #(
int
main (void)
{
-void *x=inet_pton
+(void)inet_pton
;
return 0;
}
@@ -23643,7 +23643,7 @@ else case e in #(
int
main (void)
{
-void *x=getpeername
+(void)getpeername
;
return 0;
}
@@ -23689,7 +23689,7 @@ else case e in #(
int
main (void)
{
-void *x=getsockname
+(void)getsockname
;
return 0;
}
@@ -23735,7 +23735,7 @@ else case e in #(
int
main (void)
{
-void *x=accept
+(void)accept
;
return 0;
}
@@ -23781,7 +23781,7 @@ else case e in #(
int
main (void)
{
-void *x=bind
+(void)bind
;
return 0;
}
@@ -23827,7 +23827,7 @@ else case e in #(
int
main (void)
{
-void *x=connect
+(void)connect
;
return 0;
}
@@ -23873,7 +23873,7 @@ else case e in #(
int
main (void)
{
-void *x=listen
+(void)listen
;
return 0;
}
@@ -23919,7 +23919,7 @@ else case e in #(
int
main (void)
{
-void *x=recvfrom
+(void)recvfrom
;
return 0;
}
@@ -23965,7 +23965,7 @@ else case e in #(
int
main (void)
{
-void *x=sendto
+(void)sendto
;
return 0;
}
@@ -24011,7 +24011,7 @@ else case e in #(
int
main (void)
{
-void *x=setsockopt
+(void)setsockopt
;
return 0;
}
@@ -24057,7 +24057,7 @@ else case e in #(
int
main (void)
{
-void *x=socket
+(void)socket
;
return 0;
}
@@ -24105,7 +24105,7 @@ else case e in #(
int
main (void)
{
-void *x=setgroups
+(void)setgroups
;
return 0;
}
@@ -25720,7 +25720,7 @@ else case e in #(
int
main (void)
{
-void *x=socketpair
+(void)socketpair
;
return 0;
}
diff --git a/configure.ac b/configure.ac
index f7661778b757421..bbe654ac8f26c72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ AC_DEFUN([PY_CHECK_FUNC],
[for $1],
[py_var],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([$2], [void *x=$1])],
+ [AC_LANG_PROGRAM([$2], [(void)$1])],
[AS_VAR_SET([py_var], [yes])],
[AS_VAR_SET([py_var], [no])])]
)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]