[meta-oe][PATCH] thermald: fix building on 32-bit ARM systems
Dmitry Baryshkov <[email protected]>
| Newsgroups | org.openembedded.lists.openembedded-devel |
|---|---|
| Message-ID | <[email protected]> |
Apply a patch fixing the following error:
thd_gddv.cpp: In member function 'int thd_gddv::evaluate_condition(condition&)':
thd_gddv.cpp:1721:39: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=]
Signed-off-by: Dmitry Baryshkov <[email protected]>
---
..._gddv-fix-building-on-32-bit-systems.patch | 29 +++++++++++++++++++
.../recipes-bsp/thermald/thermald_2.5.12.bb | 5 +++-
2 files changed, 33 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch
diff --git a/meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch b/meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch
new file mode 100644
index 000000000000..b445c98db9bb
--- /dev/null
+++ b/meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch
@@ -0,0 +1,29 @@
+From 30251d7754fe308251747dc40328a52a6b0e0601 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <[email protected]>
+Date: Sat, 8 Aug 2026 00:27:15 +0300
+Subject: [PATCH] thd_gddv: fix building on 32-bit systems
+
+Fix the error caused by type mismatch:
+
+src/thd_gddv.cpp: In member function 'int cthd_gddv::evaluate_condition(condition&)':
+src/thd_gddv.cpp:1721:39: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=]
+
+Signed-off-by: Dmitry Baryshkov <[email protected]>
+Upstream-Status: Pending [waiting for clearance]
+---
+ src/thd_gddv.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/thd_gddv.cpp b/src/thd_gddv.cpp
+index e822b9f72f45..a2691594960d 100644
+--- a/src/thd_gddv.cpp
++++ b/src/thd_gddv.cpp
+@@ -1718,7 +1718,7 @@ int cthd_gddv::evaluate_condition(struct condition& condition) {
+ return ret;
+
+ if (condition.time) {
+- thd_log_debug("time condition matched %ld \n", condition.state_entry_time);
++ thd_log_debug("time condition matched %" PRId64" \n", condition.state_entry_time);
+ if (condition.state_entry_time == 0) {
+ condition.state_entry_time = time(nullptr);
+ return THD_ERROR;
diff --git a/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb b/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb
index 6b193466a367..937e9a5705c2 100644
--- a/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb
+++ b/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb
@@ -12,7 +12,10 @@ DEPENDS += "autoconf-archive-native"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848"
-SRC_URI = "git://github.com/intel/thermal_daemon/;branch=master;protocol=https;tag=v${PV}"
+SRC_URI = " \
+ git://github.com/intel/thermal_daemon/;branch=master;protocol=https;tag=v${PV} \
+ file://0001-thd_gddv-fix-building-on-32-bit-systems.patch \
+"
SRCREV = "9996a1a1cdd01d32cd411459368a177f463d0047"
--
2.47.3