repo/gentoo:master commit in: sys-libs/musl/files/, sys-libs/musl/

Andreas K. Hüttel <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786706532.d18197fd8274e9f0f645f4366746743003d68596.dilfridge@gentoo>
commit:     d18197fd8274e9f0f645f4366746743003d68596
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 14 11:20:47 2026 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Aug 14 11:22:12 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d18197fd

sys-libs/musl: one more patch for riscv32 needed

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 .../musl/files/musl-1.2.6-riscv32-syscalls-2.patch | 32 ++++++++++++++++++++++
 sys-libs/musl/musl-1.2.6-r2.ebuild                 |  1 +
 2 files changed, 33 insertions(+)

diff --git a/sys-libs/musl/files/musl-1.2.6-riscv32-syscalls-2.patch b/sys-libs/musl/files/musl-1.2.6-riscv32-syscalls-2.patch
new file mode 100644
index 000000000000..c37df9bb3b5f
--- /dev/null
+++ b/sys-libs/musl/files/musl-1.2.6-riscv32-syscalls-2.patch
@@ -0,0 +1,32 @@
+
+https://www.openwall.com/lists/musl/2026/07/13/3
+
+>From e28fefd3e46c5e7537a2901a9c3494e946eaae85 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <[email protected]>
+Date: Mon, 13 Jul 2026 06:44:27 +0000
+Subject: [PATCH] clock_nanosleep: define SYS_nanosleep to fix riscv32
+
+riscv32 does not have SYS_nanosleep, but it is used in unreachable
+fallback code.
+---
+ src/time/clock_nanosleep.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/time/clock_nanosleep.c b/src/time/clock_nanosleep.c
+index e195499c..f75f7f2a 100644
+--- a/src/time/clock_nanosleep.c
++++ b/src/time/clock_nanosleep.c
+@@ -19,6 +19,9 @@ int __clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, stru
+ 		return -r;
+ 	long long extra = s - CLAMP(s);
+ 	long ts32[2] = { CLAMP(s), ns };
++#ifndef SYS_nanosleep
++#define SYS_nanosleep -1
++#endif
+ 	if (clk == CLOCK_REALTIME && !flags)
+ 		r = __syscall_cp(SYS_nanosleep, &ts32, &ts32);
+ 	else
+-- 
+2.52.0
+
+

diff --git a/sys-libs/musl/musl-1.2.6-r2.ebuild b/sys-libs/musl/musl-1.2.6-r2.ebuild
index 0eb1df0824b6..3c5e221e5603 100644
--- a/sys-libs/musl/musl-1.2.6-r2.ebuild
+++ b/sys-libs/musl/musl-1.2.6-r2.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-getifaddrs-qemu-workaround.patch
 	"${WORKDIR}"/${P}-patches
 	"${FILESDIR}"/${P}-riscv32-syscalls.patch
+	"${FILESDIR}"/${P}-riscv32-syscalls-2.patch
 )
 
 just_headers() {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.