commit:     6da5a9571d82af96730a4ecb966b58b4c18c13a7
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  8 15:29:25 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Oct  8 15:29:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6da5a957

sys-libs/libxcrypt: add musl workaround

Closes: https://bugs.gentoo.org/838172
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild | 7 +++++++
 sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild 
b/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild
index b43b4ada2480..c55c58c004b0 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild
@@ -172,6 +172,13 @@ multilib_src_configure() {
                --mandir="$(get_xcmandir)"
        )
 
+       if use elibc_musl; then
+               # musl declares getcontext and swapcontext in ucontext.h,
+               # but does not implement them in libc.
+               # https://bugs.gentoo.org/838172
+               myconf+=( ac_cv_header_ucontext_h=no )
+       fi
+
        case "${MULTIBUILD_ID}" in
                xcrypt_compat-*)
                        myconf+=(

diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild 
b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild
index 5bac36b61b87..8cd9318c3373 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild
@@ -174,6 +174,13 @@ multilib_src_configure() {
                --mandir="$(get_xcmandir)"
        )
 
+       if use elibc_musl; then
+               # musl declares getcontext and swapcontext in ucontext.h,
+               # but does not implement them in libc.
+               # https://bugs.gentoo.org/838172
+               myconf+=( ac_cv_header_ucontext_h=no )
+       fi
+
        case "${MULTIBUILD_ID}" in
                xcrypt_compat-*)
                        myconf+=(

Reply via email to