diff mbox series

[v3,21/27] psplash: Fix build with GCC 15

Message ID 20250319081610.3536475-30-raj.khem@gmail.com
State New
Headers show
Series [v3,01/27] webkitgtk: 2.46.6 -> 2.48.0 | expand

Commit Message

Khem Raj March 19, 2025, 8:15 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ine-bool-if-using-C-standard-older-t.patch | 32 +++++++++++++++++++
 meta/recipes-core/psplash/psplash_git.bb      |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-core/psplash/files/0001-psplash-Only-define-bool-if-using-C-standard-older-t.patch
diff mbox series

Patch

diff --git a/meta/recipes-core/psplash/files/0001-psplash-Only-define-bool-if-using-C-standard-older-t.patch b/meta/recipes-core/psplash/files/0001-psplash-Only-define-bool-if-using-C-standard-older-t.patch
new file mode 100644
index 00000000000..cc5f2e02e65
--- /dev/null
+++ b/meta/recipes-core/psplash/files/0001-psplash-Only-define-bool-if-using-C-standard-older-t.patch
@@ -0,0 +1,32 @@ 
+From eab6948cd8eba493f2af7533a931df5ef1d30715 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 17 Mar 2025 20:31:19 -0700
+Subject: [PATCH] psplash: Only define bool if using C standard older than C23
+
+gcc-15 switched to -std=c23 by default:
+
+https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212
+
+only typedef int bool for __STDC_VERSION__ <= 201710L (C17)
+
+Upstream-Status: Submitted [https://lists.yoctoproject.org/g/yocto-patches/message/1213]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ psplash.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/psplash.h b/psplash.h
+index 1c42ec7..138e49d 100644
+--- a/psplash.h
++++ b/psplash.h
+@@ -37,7 +37,10 @@
+ 
+ typedef uint8_t  uint8;
+ typedef uint16_t uint16;
++
++#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L
+ typedef int            bool;
++#endif
+ 
+ #ifndef FALSE
+ #define FALSE 0
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 233c07a380c..e47c9b408dc 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -10,6 +10,7 @@  SRCREV = "5a32cf6392c784a7ae1983a354cf07b024625cd2"
 PV = "0.1+git"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https \
+           file://0001-psplash-Only-define-bool-if-using-C-standard-older-t.patch \
            file://psplash-init \
            file://psplash-start@.service \
            file://psplash-systemd.service \