summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share/0001-build-Define-list-of-libc-feature-test-macros.patch41
-rw-r--r--meta-gnome/recipes-gnome/gnome-user-share/gnome-user-share_47.0.bb1
2 files changed, 42 insertions, 0 deletions
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 @@
1From 5f2e3fb82055ee1346eaa20fcca640fc802ae1c5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 24 Sep 2024 03:19:24 +0000
4Subject: [PATCH] build: Define list of libc feature test macros
5
6_POSIX_C_SOURCE is needed since it uses kill() API
7and as per [1] it need it, without this the build fails
8particularly on musl systems with clang compiler
9
10./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]
11
12[1] https://man7.org/linux/man-pages/man2/kill.2.html
13
14Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gnome-user-share/-/merge_requests/27]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 meson.build | 11 +++++++++++
18 1 file changed, 11 insertions(+)
19
20diff --git a/meson.build b/meson.build
21index ea2892e..72f3851 100644
22--- a/meson.build
23+++ b/meson.build
24@@ -39,6 +39,17 @@ config_h.set_quoted('GNOMELOCALEDIR', user_share_prefix / user_share_localedir)
25
26 config_h.set_quoted('HTTPD_CONFIG_TEMPLATE', user_share_prefix / user_share_pkgdatadir / 'dav_user_%s.conf')
27
28+#
29+# OS/Compiler feature detection
30+#
31+feature_defines = [
32+ ['_XOPEN_SOURCE', '700'], # POSIX.1–2001 (IEEE Std 1003.1-2001)
33+]
34+
35+foreach f: feature_defines
36+ config_h.set(f[0], f[1])
37+endforeach
38+
39 # compiler flags
40 common_flags = []
41 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
14REQUIRED_DISTRO_FEATURES = "systemd" 14REQUIRED_DISTRO_FEATURES = "systemd"
15 15
16SRC_URI = "git://gitlab.gnome.org/GNOME/gnome-user-share.git;protocol=https;branch=master" 16SRC_URI = "git://gitlab.gnome.org/GNOME/gnome-user-share.git;protocol=https;branch=master"
17SRC_URI += "file://0001-build-Define-list-of-libc-feature-test-macros.patch"
17SRCREV = "77ecbaddab0ed2121859926acbfccc9cecdee0db" 18SRCREV = "77ecbaddab0ed2121859926acbfccc9cecdee0db"
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
19 20