The patch fixes the need for -fcommon

Signed-off-by: Khem Raj <[email protected]>
Cc: Armin Kuster <[email protected]>
---
 .../0001-Fix-build-under-GCC-fno-common.patch | 43 +++++++++++++++++++
 .../recipes-devtools/musl/musl-nscd_git.bb    |  6 +--
 2 files changed, 46 insertions(+), 3 deletions(-)
 create mode 100644 
meta-oe/recipes-devtools/musl/musl-nscd/0001-Fix-build-under-GCC-fno-common.patch

diff --git 
a/meta-oe/recipes-devtools/musl/musl-nscd/0001-Fix-build-under-GCC-fno-common.patch
 
b/meta-oe/recipes-devtools/musl/musl-nscd/0001-Fix-build-under-GCC-fno-common.patch
new file mode 100644
index 0000000000..6fee0526d2
--- /dev/null
+++ 
b/meta-oe/recipes-devtools/musl/musl-nscd/0001-Fix-build-under-GCC-fno-common.patch
@@ -0,0 +1,43 @@
+From 8c0e4b7907eb577b1e5214f9a7bc75d5c3263b0a Mon Sep 17 00:00:00 2001
+From: Ariadne Conill <[email protected]>
+Date: Sat, 14 Nov 2020 22:55:30 -0700
+Subject: [PATCH] Fix build under GCC -fno-common.
+
+Upstream-Status: Submitted [https://github.com/pikhq/musl-nscd/pull/11]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ include/modules.h | 4 ++--
+ src/main.c        | 3 +++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/include/modules.h b/include/modules.h
+index 70c1960..e77ec58 100644
+--- 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
+diff --git a/src/main.c b/src/main.c
+index c1a78bb..808ef74 100644
+--- 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;
+-- 
+2.29.2
+
diff --git a/meta-oe/recipes-devtools/musl/musl-nscd_git.bb 
b/meta-oe/recipes-devtools/musl/musl-nscd_git.bb
index b03cc868fd..94a506ae71 100644
--- a/meta-oe/recipes-devtools/musl/musl-nscd_git.bb
+++ b/meta-oe/recipes-devtools/musl/musl-nscd_git.bb
@@ -9,10 +9,10 @@ SECTION = "utils"
 
 PV = "1.0.2"
 
-CFLAGS += "-fcommon"
-
 SRCREV = "af581482a3e1059458f3c8b20a56f82807ca3bd4"
-SRC_URI = "git://github.com/pikhq/musl-nscd"
+SRC_URI = "git://github.com/pikhq/musl-nscd \
+           file://0001-Fix-build-under-GCC-fno-common.patch \
+          "
 
 UPSTREAM_CHECK_COMMITS = "1"
 
-- 
2.29.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#88048): 
https://lists.openembedded.org/g/openembedded-devel/message/88048
Mute This Topic: https://lists.openembedded.org/mt/78439115/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to