diff mbox series

[meta-gnome,1/3] gdm: fix gcc 15 issue

Message ID 20250513125209.1088462-1-f_l_k@t-online.de
State Under Review
Headers show
Series [meta-gnome,1/3] gdm: fix gcc 15 issue | expand

Commit Message

Markus Volk May 13, 2025, 12:52 p.m. UTC
add a backport patch to fix:
| In file included from ../gdm-48.0/common/gdm-settings-direct.c:38:
| ../gdm-48.0/common/gdm-settings-utils.h:47:77: error: expected ';', ',' or ')' before 'bool'
|    47 |                                                                 gboolean   *bool);
|       |                                                                             ^~~~

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 ...aca75e16aeafc171751028406b54f5ed8397.patch | 56 +++++++++++++++++++
 meta-gnome/recipes-gnome/gdm/gdm_48.0.bb      |  1 +
 2 files changed, 57 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/gdm/gdm/a3e0aca75e16aeafc171751028406b54f5ed8397.patch
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/gdm/gdm/a3e0aca75e16aeafc171751028406b54f5ed8397.patch b/meta-gnome/recipes-gnome/gdm/gdm/a3e0aca75e16aeafc171751028406b54f5ed8397.patch
new file mode 100644
index 0000000000..8363a7f41d
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gdm/gdm/a3e0aca75e16aeafc171751028406b54f5ed8397.patch
@@ -0,0 +1,56 @@ 
+From 2fbc2ac50b9f143eb594e5f77a8051222ffbd2c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Mon, 27 Jan 2025 14:01:23 +0100
+Subject: [PATCH] gdm-settings-utils: rename variable to fix build with gcc 15
+
+In GNU23 C, bool is a keyword. Rename the variable to avoid syntax error.
+---
+ common/gdm-settings-utils.c | 8 ++++----
+ common/gdm-settings-utils.h | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+ 
+ Signed-off-by: Markus Volk <f_l_k@t-online.de>
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gdm/-/commit/a3e0aca75e16aeafc171751028406b54f5ed8397.patch]
+
+diff --git a/common/gdm-settings-utils.c b/common/gdm-settings-utils.c
+index 636be3a9e..da4c7aefb 100644
+--- a/common/gdm-settings-utils.c
++++ b/common/gdm-settings-utils.c
+@@ -287,16 +287,16 @@ gdm_settings_parse_boolean_as_value  (gboolean boolval)
+ /* adapted from GKeyFile */
+ gboolean
+ gdm_settings_parse_value_as_boolean (const char *value,
+-                                     gboolean   *bool)
++                                     gboolean   *boolval)
+ {
+         g_return_val_if_fail (value != NULL, FALSE);
+-        g_return_val_if_fail (bool != NULL, FALSE);
++        g_return_val_if_fail (boolval != NULL, FALSE);
+ 
+         if (g_ascii_strcasecmp (value, "true") == 0 || strcmp (value, "1") == 0) {
+-                *bool = TRUE;
++                *boolval = TRUE;
+                 return TRUE;
+         } else if (g_ascii_strcasecmp (value, "false") == 0 || strcmp (value, "0") == 0) {
+-                *bool = FALSE;
++                *boolval = FALSE;
+                 return TRUE;
+         } else {
+                 return FALSE;
+diff --git a/common/gdm-settings-utils.h b/common/gdm-settings-utils.h
+index 4f2362ce7..734d625c7 100644
+--- a/common/gdm-settings-utils.h
++++ b/common/gdm-settings-utils.h
+@@ -44,7 +44,7 @@ gboolean                  gdm_settings_parse_schemas           (const char  *fil
+                                                                 GSList     **list);
+ 
+ gboolean                  gdm_settings_parse_value_as_boolean  (const char *value,
+-                                                                gboolean   *bool);
++                                                                gboolean   *boolval);
+ gboolean                  gdm_settings_parse_value_as_integer  (const char *value,
+                                                                 int        *intval);
+ gboolean                  gdm_settings_parse_value_as_double   (const char *value,
+-- 
+GitLab
+
diff --git a/meta-gnome/recipes-gnome/gdm/gdm_48.0.bb b/meta-gnome/recipes-gnome/gdm/gdm_48.0.bb
index 1c8076e6c7..92ddc143f6 100644
--- a/meta-gnome/recipes-gnome/gdm/gdm_48.0.bb
+++ b/meta-gnome/recipes-gnome/gdm/gdm_48.0.bb
@@ -21,6 +21,7 @@  GIR_MESON_OPTION = ""
 
 inherit gnomebase gsettings pkgconfig gobject-introspection gettext systemd useradd itstool gnome-help features_check
 
+SRC_URI += "file://a3e0aca75e16aeafc171751028406b54f5ed8397.patch"
 SRC_URI[archive.sha256sum] = "1bc06daff093ec7b5e37ecb4f92e5da3474a1b1ba076edb9151ee967d1c30adf"
 
 PACKAGECONFIG ??= ""