commit:     2c78de9033cf97213ddd4983b04df2eef995fc39
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Mon Dec 28 15:17:11 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 15:17:11 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c78de90

sys-libs/musl-nscd: Fix build with gcc-10

Closes: https://github.com/gentoo/gentoo/pull/18635
Closes: https://bugs.gentoo.org/708632
Package-Manager: Portage-3.0.9, Repoman-3.0.1
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/musl-nscd-1.0.2-fno-common.patch         | 36 ++++++++++++++++++++++
 sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild          |  6 ++--
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/sys-libs/musl-nscd/files/musl-nscd-1.0.2-fno-common.patch 
b/sys-libs/musl-nscd/files/musl-nscd-1.0.2-fno-common.patch
new file mode 100644
index 00000000000..fce44ecdef7
--- /dev/null
+++ b/sys-libs/musl-nscd/files/musl-nscd-1.0.2-fno-common.patch
@@ -0,0 +1,36 @@
+--- a/include/modules.h
++++ b/include/modules.h
+@@ -28,7 +28,7 @@ struct mod_passwd {
+       link_t link;
+ };
+ 
+-list_t passwd_mods;
+-list_t group_mods;
++extern list_t passwd_mods;
++extern list_t group_mods;
+ 
+ #endif
+--- a/src/main.c
++++ b/src/main.c
+@@ -18,6 +18,9 @@
+ #include "parse.h"
+ #include "util.h"
+ 
++list_t passwd_mods;
++list_t group_mods;
++
+ static void *get_dll(const char *service)
+ {
+       char *path;
+--- a/src/socket_handle.c
++++ b/src/socket_handle.c
+@@ -19,6 +19,9 @@
+ #include "modules.h"
+ #include "list.h"
+ 
++extern list_t passwd_mods;
++extern list_t group_mods;
++
+ static int return_result(int fd, int swap, uint32_t reqtype, void *key);
+ 
+ struct pthread_args {

diff --git a/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild 
b/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild
index 6d29e439755..41e38df7180 100644
--- a/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild
+++ b/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild
@@ -8,7 +8,7 @@ inherit systemd
 DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl 
libc"
 HOMEPAGE="https://github.com/pikhq/musl-nscd";
 
-if [[ ${PV} == "9999" ]] ; then
+if [[ ${PV} == *9999 ]] ; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/pikhq/musl-nscd";
        EGIT_BRANCH=master
@@ -25,8 +25,10 @@ DEPEND="
        !sys-libs/glibc
        !sys-libs/uclibc"
 
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
 src_prepare() {
-       eapply_user
+       default
 
        sed -i '/LDFLAGS_AUTO=-s/d' configure || die 'Cannot patch configure 
file'
 }

Reply via email to