commit:     4f369d9bb8b2f05d183d5b8d9c39e470c26e67be
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Tue Dec 23 03:23:14 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 24 16:36:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f369d9b

net-misc/smbc: fix build on musl

fix error below:

> dcigettext.c:154:7: error: conflicting types for 'getcwd'; have 'char *(void)'
>   154 | char *getcwd ();
>       |       ^~~~~~

Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45132
Closes: https://github.com/gentoo/gentoo/pull/45132
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/smbc/files/smbc-1.2.2-getcwd.patch | 19 +++++++++++++++++++
 net-misc/smbc/smbc-1.2.2-r4.ebuild          |  1 +
 2 files changed, 20 insertions(+)

diff --git a/net-misc/smbc/files/smbc-1.2.2-getcwd.patch 
b/net-misc/smbc/files/smbc-1.2.2-getcwd.patch
new file mode 100644
index 000000000000..b2bbc81d35ad
--- /dev/null
+++ b/net-misc/smbc/files/smbc-1.2.2-getcwd.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 35238e2..1d027bb 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/net-misc/smbc/smbc-1.2.2-r4.ebuild 
b/net-misc/smbc/smbc-1.2.2-r4.ebuild
index 60b4a1c68a9a..ab194c51b4ed 100644
--- a/net-misc/smbc/smbc-1.2.2-r4.ebuild
+++ b/net-misc/smbc/smbc-1.2.2-r4.ebuild
@@ -31,6 +31,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-tinfo.patch
        "${FILESDIR}"/0001-Fix-signal-handlers.patch
        "${FILESDIR}"/0002-Fix-Wformat-security.patch
+       "${FILESDIR}"/${P}-getcwd.patch
 )
 
 src_prepare() {

Reply via email to