Signed-off-by: Khem Raj <[email protected]>
Cc: Markus Volk <[email protected]>
---
 .../0001-include-locale.h-for-setlocale.patch | 34 +++++++++++++++++++
 .../gnome-console/gnome-console_47.0.bb       |  2 +-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 
meta-gnome/recipes-gnome/gnome-console/gnome-console/0001-include-locale.h-for-setlocale.patch

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 0000000000..28f26476ce
--- /dev/null
+++ 
b/meta-gnome/recipes-gnome/gnome-console/gnome-console/0001-include-locale.h-for-setlocale.patch
@@ -0,0 +1,34 @@
+From e72f6da3d509561b75e223667a0380772e7bd48a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 23 Sep 2024 20:38:09 -0700
+Subject: [PATCH] include locale.h for setlocale()
+
+This issue is surfaced on systems+clang
+
+Fixes
+../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]
+   29 |   setlocale (LC_ALL, "");
+      |   ^
+../gnome-console-47.0/src/main.c:29:14: error: use of undeclared identifier 
'LC_ALL'
+   29 |   setlocale (LC_ALL, "");
+      |              ^
+
+Upstream-Status: Submitted 
[https://gitlab.gnome.org/GNOME/console/-/merge_requests/171]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.c b/src/main.c
+index af9c5a5..5d16160 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -17,7 +17,7 @@
+  */
+ 
+ #include <glib/gi18n.h>
+-
++#include <locale.h>
+ #include <kgx.h>
+ 
+ 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 922b0576e1..8785ca013c 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 = " \
     pcre2 \
     vte \
 "
-
+SRC_URI += "file://0001-include-locale.h-for-setlocale.patch"
 SRC_URI[archive.sha256sum] = 
"487ec0de0a24f12ef6f778e4aee98d744a9dcc921c9e7df98b2d9f410b00ef52"
 
 PACKAGECONFIG ?= ""
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#112467): 
https://lists.openembedded.org/g/openembedded-devel/message/112467
Mute This Topic: https://lists.openembedded.org/mt/108622663/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to