Signed-off-by: Khem Raj <[email protected]>
Cc: Markus Volk <[email protected]>
---
 ...ine-list-of-libc-feature-test-macros.patch | 41 +++++++++++++++++++
 .../gnome-user-share/gnome-user-share_47.0.bb |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 
meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share/0001-build-Define-list-of-libc-feature-test-macros.patch

diff --git 
a/meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share/0001-build-Define-list-of-libc-feature-test-macros.patch
 
b/meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share/0001-build-Define-list-of-libc-feature-test-macros.patch
new file mode 100644
index 0000000000..fbbda824e3
--- /dev/null
+++ 
b/meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share/0001-build-Define-list-of-libc-feature-test-macros.patch
@@ -0,0 +1,41 @@
+From 5f2e3fb82055ee1346eaa20fcca640fc802ae1c5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 24 Sep 2024 03:19:24 +0000
+Subject: [PATCH] build: Define list of libc feature test macros
+
+_POSIX_C_SOURCE is needed since it uses kill() API
+and as per [1] it need it, without this the build fails
+particularly on musl systems with clang compiler
+
+./git/src/http.c:394:3: error: call to undeclared function 'kill'; ISO C99 and 
later do not support implicit function declarations 
[-Wimplicit-function-declaration]
+
+[1] https://man7.org/linux/man-pages/man2/kill.2.html
+
+Upstream-Status: Submitted 
[https://gitlab.gnome.org/GNOME/gnome-user-share/-/merge_requests/27]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ meson.build | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index ea2892e..72f3851 100644
+--- a/meson.build
++++ b/meson.build
+@@ -39,6 +39,17 @@ config_h.set_quoted('GNOMELOCALEDIR', user_share_prefix / 
user_share_localedir)
+ 
+ config_h.set_quoted('HTTPD_CONFIG_TEMPLATE', user_share_prefix / 
user_share_pkgdatadir / 'dav_user_%s.conf')
+ 
++#
++# OS/Compiler feature detection
++#
++feature_defines = [
++  ['_XOPEN_SOURCE', '700'], # POSIX.1–2001 (IEEE Std 1003.1-2001)
++]
++
++foreach f: feature_defines
++  config_h.set(f[0], f[1])
++endforeach
++
+ # compiler flags
+ common_flags = []
+ if get_option('buildtype').contains('debug')
diff --git a/meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share_47.0.bb 
b/meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share_47.0.bb
index 4c8ad3a2af..8e4b238b85 100644
--- a/meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share_47.0.bb
+++ b/meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share_47.0.bb
@@ -14,6 +14,7 @@ inherit gnomebase gsettings features_check
 REQUIRED_DISTRO_FEATURES = "systemd"
 
 SRC_URI = 
"git://gitlab.gnome.org/GNOME/gnome-user-share.git;protocol=https;branch=master"
+SRC_URI += "file://0001-build-Define-list-of-libc-feature-test-macros.patch"
 SRCREV = "77ecbaddab0ed2121859926acbfccc9cecdee0db"
 S = "${WORKDIR}/git"
 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#112465): 
https://lists.openembedded.org/g/openembedded-devel/message/112465
Mute This Topic: https://lists.openembedded.org/mt/108622582/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to