From 14f96a8d8f2aadf1a71c0ba39e87baddd0adda40 Mon Sep 17 00:00:00 2001 From: Priyanshu Singh Date: Wed, 14 Jan 2026 23:17:55 +0530 Subject: [PATCH] gh-143632: Disable PR_SET_VMA_ANON_NAME on musl libc (gh-143730) --- configure | 4 ++++ configure.ac | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 411bc1a23226..9d7fe6c52a41 100755 --- 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 #include @@ -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 diff --git a/configure.ac b/configure.ac index 9e63c8f6144c..8c421c2a2baa 100644 --- a/configure.ac +++ b/configure.ac @@ -5595,14 +5595,15 @@ AC_CHECK_DECLS([UT_NAMESIZE], [Define if you have the 'HAVE_UT_NAMESIZE' constant.])], [], [@%:@include ]) - +# 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 @%:@include ]) - +]) # check for openpty, login_tty, and forkpty AC_CHECK_FUNCS([openpty], [], -- 2.47.3