summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-09-23 20:42:39 -0700
committerKhem Raj <raj.khem@gmail.com>2024-10-11 00:25:46 -0700
commit1a30244e30c75e2e95f843a331ccb872ceeaef10 (patch)
treed24f093617f924901d6f8363ee66105697443ac9
parented4d00ed1ec1955ef40b662c64a350b5d81d4be9 (diff)
downloadmeta-openembedded-1a30244e30c75e2e95f843a331ccb872ceeaef10.tar.gz
gnome-console: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Markus Volk <f_l_k@t-online.de>
-rw-r--r--meta-gnome/recipes-gnome/gnome-console/gnome-console/0001-include-locale.h-for-setlocale.patch34
-rw-r--r--meta-gnome/recipes-gnome/gnome-console/gnome-console_47.0.bb2
2 files changed, 35 insertions, 1 deletions
diff --git a/meta-gnome/recipes-gnome/gnome-console/gnome-console/0001-include-locale.h-for-setlocale.patch b/meta-gnome/recipes-gnome/gnome-console/gnome-console/0001-include-locale.h-for-setlocale.patch
new file mode 100644
index 000000000..28f26476c
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gnome-console/gnome-console/0001-include-locale.h-for-setlocale.patch
@@ -0,0 +1,34 @@
1From e72f6da3d509561b75e223667a0380772e7bd48a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 23 Sep 2024 20:38:09 -0700
4Subject: [PATCH] include locale.h for setlocale()
5
6This issue is surfaced on systems+clang
7
8Fixes
9../gnome-console-47.0/src/main.c:29:3: error: call to undeclared function 'setlocale'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
10 29 | setlocale (LC_ALL, "");
11 | ^
12../gnome-console-47.0/src/main.c:29:14: error: use of undeclared identifier 'LC_ALL'
13 29 | setlocale (LC_ALL, "");
14 | ^
15
16Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/console/-/merge_requests/171]
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 src/main.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/src/main.c b/src/main.c
23index af9c5a5..5d16160 100644
24--- a/src/main.c
25+++ b/src/main.c
26@@ -17,7 +17,7 @@
27 */
28
29 #include <glib/gi18n.h>
30-
31+#include <locale.h>
32 #include <kgx.h>
33
34 int
diff --git a/meta-gnome/recipes-gnome/gnome-console/gnome-console_47.0.bb b/meta-gnome/recipes-gnome/gnome-console/gnome-console_47.0.bb
index 922b0576e..8785ca013 100644
--- a/meta-gnome/recipes-gnome/gnome-console/gnome-console_47.0.bb
+++ b/meta-gnome/recipes-gnome/gnome-console/gnome-console_47.0.bb
@@ -17,7 +17,7 @@ DEPENDS = " \
17 pcre2 \ 17 pcre2 \
18 vte \ 18 vte \
19" 19"
20 20SRC_URI += "file://0001-include-locale.h-for-setlocale.patch"
21SRC_URI[archive.sha256sum] = "487ec0de0a24f12ef6f778e4aee98d744a9dcc921c9e7df98b2d9f410b00ef52" 21SRC_URI[archive.sha256sum] = "487ec0de0a24f12ef6f778e4aee98d744a9dcc921c9e7df98b2d9f410b00ef52"
22 22
23PACKAGECONFIG ?= "" 23PACKAGECONFIG ?= ""