commit:     1f464f19b3359f5d325c3cded647614b822cd502
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 20 19:27:18 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 19:27:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f464f19

dev-ml/core_unix: fix musl build

Closes: https://bugs.gentoo.org/895840
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ml/core_unix/core_unix-0.15.2-r1.ebuild        |  2 ++
 dev-ml/core_unix/files/core_unix-0.15.2-musl.patch | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/dev-ml/core_unix/core_unix-0.15.2-r1.ebuild 
b/dev-ml/core_unix/core_unix-0.15.2-r1.ebuild
index afbc6c1676e2..ae132f20399d 100644
--- a/dev-ml/core_unix/core_unix-0.15.2-r1.ebuild
+++ b/dev-ml/core_unix/core_unix-0.15.2-r1.ebuild
@@ -26,6 +26,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND=""
 
+PATCHES=( "${FILESDIR}"/${P}-musl.patch )
+
 src_prepare() {
        sed -i \
                -e "s:gcc:$(tc-getCC):" \

diff --git a/dev-ml/core_unix/files/core_unix-0.15.2-musl.patch 
b/dev-ml/core_unix/files/core_unix-0.15.2-musl.patch
new file mode 100644
index 000000000000..fb1101426ba2
--- /dev/null
+++ b/dev-ml/core_unix/files/core_unix-0.15.2-musl.patch
@@ -0,0 +1,11 @@
+--- a/bigstring_unix/src/bigstring_unix_stubs.c        2023-04-20 
21:13:23.374157594 +0200
++++ b/bigstring_unix/src/bigstring_unix_stubs.c        2023-04-20 
21:13:32.900011808 +0200
+@@ -699,7 +699,7 @@
+   int count = Int_val(v_count);
+   size_t total_len = 0;
+   struct iovec *iovecs = copy_iovecs(&total_len, v_iovecs, count);
+-  struct msghdr msghdr = { NULL, 0, NULL, 0, NULL, 0, 0 };
++  struct msghdr msghdr = { NULL };
+   ssize_t ret;
+   if (total_len > THREAD_IO_CUTOFF || contains_mmapped(v_iovecs, count)) {
+     Begin_roots1(v_iovecs);

Reply via email to