diff --git a/configure b/configure index b1faeaf806a9c6..1963a1a568e816 100755 --- a/configure +++ b/configure @@ -23965,6 +23965,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 @@ -23985,6 +23988,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 043ec957f40894..935a39b27b68a9 100644 --- a/configure.ac +++ b/configure.ac @@ -5594,14 +5594,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], [],