From 7143f4a01836f8991d6c90b61fa919e88bf9a0fd Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Tue, 30 Dec 2025 14:36:01 +0800 Subject: [PATCH] app-text/opensp: fix build on musl fix error below: > dcigettext.c:154:7: error: conflicting types for 'getcwd'; have 'char *(void)' > 154 | char *getcwd (); > | ^~~~~~ Closes: https://bugs.gentoo.org/947175 Signed-off-by: Z. Liu Part-of: https://github.com/gentoo/gentoo/pull/45199 Signed-off-by: Sam James --- .../files/opensp-1.5.2-gcc15-musl.patch | 19 +++++++++++++++++++ app-text/opensp/opensp-1.5.2-r10.ebuild | 1 + 2 files changed, 20 insertions(+) create mode 100644 app-text/opensp/files/opensp-1.5.2-gcc15-musl.patch diff --git a/app-text/opensp/files/opensp-1.5.2-gcc15-musl.patch b/app-text/opensp/files/opensp-1.5.2-gcc15-musl.patch new file mode 100644 index 0000000000000..fde1e680f11b1 --- /dev/null +++ b/app-text/opensp/files/opensp-1.5.2-gcc15-musl.patch @@ -0,0 +1,19 @@ +fix error on musl: + +dcigettext.c:154:7: error: conflicting types for 'getcwd'; have 'char *(void)' + 154 | char *getcwd (); + | ^~~~~~ + +diff --git a/intl/dcigettext.c b/intl/dcigettext.c +index c7f4506..9dad6c4 100644 +--- a/intl/dcigettext.c ++++ b/intl/dcigettext.c +@@ -151,7 +151,7 @@ char *getwd (); + # if VMS + # define getcwd(buf, max) (getcwd) (buf, max, 0) + # else +-char *getcwd (); ++char *getcwd (char *, size_t); + # endif + # endif + # ifndef HAVE_STPCPY diff --git a/app-text/opensp/opensp-1.5.2-r10.ebuild b/app-text/opensp/opensp-1.5.2-r10.ebuild index 8cbcf74a34006..b097ba7761243 100644 --- a/app-text/opensp/opensp-1.5.2-r10.ebuild +++ b/app-text/opensp/opensp-1.5.2-r10.ebuild @@ -35,6 +35,7 @@ PATCHES=( "${FILESDIR}"/${P}-c11-using.patch "${FILESDIR}"/${P}-configure-clang16.patch "${FILESDIR}"/${P}-fix-ar-intl.patch + "${FILESDIR}"/${P}-gcc15-musl.patch ) src_prepare() {