commit:     a32c13886353c0a861cb0c140385d1bd8879fc79
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 06:59:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 10 07:50:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a32c1388

net-misc/socat: fix build on musl

Closes: https://bugs.gentoo.org/831016
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/socat/socat-1.7.4.3.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net-misc/socat/socat-1.7.4.3.ebuild 
b/net-misc/socat/socat-1.7.4.3.ebuild
index 17478f6a210d..ca8f23d51acb 100644
--- a/net-misc/socat/socat-1.7.4.3.ebuild
+++ b/net-misc/socat/socat-1.7.4.3.ebuild
@@ -43,6 +43,12 @@ src_configure() {
 
        tc-export AR
 
+       # getprotobynumber_r doesn't exist on musl, so avoid probing for it
+       # and possibly getting it wrong. TODO: fix configure?
+       # (Grabbed from Alpine Linux: 
https://git.alpinelinux.org/aports/commit/main/socat/APKBUILD?id=5edc9195355ced3db991c1a7cda5648d52019b11)
+       # bug #831016
+       use elibc_musl && export sc_cv_getprotobynumber_r=2
+
        econf \
                $(use_enable ssl openssl) \
                $(use_enable readline) \

Reply via email to