]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-143632: Disable PR_SET_VMA_ANON_NAME on musl libc (gh-143730)
authorPriyanshu Singh <priyanshu2282@gmail.com>
Wed, 14 Jan 2026 17:47:55 +0000 (23:17 +0530)
committerGitHub <noreply@github.com>
Wed, 14 Jan 2026 17:47:55 +0000 (17:47 +0000)
configure
configure.ac

index 411bc1a23226e709ee61fee0037c279f21cd178e..9d7fe6c52a418aaf9c3dcb5bbe5d30b6f35e338f 100755 (executable)
--- a/configure
+++ b/configure
@@ -23966,6 +23966,9 @@ printf "%s\n" "#define HAVE_UT_NAMESIZE 1" >>confdefs.h
 
 fi
 
+# musl libc redefines struct prctl_mm_map and conflicts with linux/prctl.h
+if test "$ac_cv_libc" != musl
+then :
 
 ac_fn_check_decl "$LINENO" "PR_SET_VMA_ANON_NAME" "ac_cv_have_decl_PR_SET_VMA_ANON_NAME" "#include <linux/prctl.h>
                #include <sys/prctl.h>
@@ -23986,6 +23989,7 @@ printf "%s\n" "#define HAVE_PR_SET_VMA_ANON_NAME 1" >>confdefs.h
 fi
 
 
+fi
 # check for openpty, login_tty, and forkpty
 
 
index 9e63c8f6144c3d06149d8695505e08a21c415478..8c421c2a2baaf65d6fcf487bfc8b7602134de895 100644 (file)
@@ -5595,14 +5595,15 @@ AC_CHECK_DECLS([UT_NAMESIZE],
                          [Define if you have the 'HAVE_UT_NAMESIZE' constant.])],
               [],
               [@%:@include <utmp.h>])
-
+# musl libc redefines struct prctl_mm_map and conflicts with linux/prctl.h
+AS_IF([test "$ac_cv_libc" != musl], [
 AC_CHECK_DECLS([PR_SET_VMA_ANON_NAME],
               [AC_DEFINE([HAVE_PR_SET_VMA_ANON_NAME], [1],
                          [Define if you have the 'PR_SET_VMA_ANON_NAME' constant.])],
               [],
               [@%:@include <linux/prctl.h>
                @%:@include <sys/prctl.h>])
-
+])
 # check for openpty, login_tty, and forkpty
 
 AC_CHECK_FUNCS([openpty], [],