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 <zhixu.liu@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45199
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Z. Liu
2025-12-30 14:36:01 +08:00
committed by Sam James
parent 0ed598288d
commit 7143f4a018
2 changed files with 20 additions and 0 deletions

View File

@@ -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

View File

@@ -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() {