Skip to contentSkip to conversation

thermald: fix building on 32-bit ARM systems

PATCH Superseded Dmitry Baryshkov 2 participants 2 messages Aug 8

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermald: fix building on 32-bit ARM systems

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=]

---
 ..._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
meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch new file +29 -0
new file mode 100644
index 000000000000..b445c98db9bb
@@ -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;
meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb +4 -1
index 6b193466a367..937e9a5705c2 100644
@@ -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"
 
Signature · 1 line
2.47.3
#1 lore raw
Quoted 54 lines · Dmitry Baryshkov via lists.openembedded.org

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=]

---
 ..._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

meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch new file +8 -0
@@ -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=]

meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch new file +12 -0
+
+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) {

meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch new file +4 -0
+                       return ret;
+
+               if (condition.time) {
+-                      thd_log_debug("time condition matched %ld \n",
Quoted 4 lines

condition.state_entry_time);
++ thd_log_debug("time condition matched %" PRId64"
\n", condition.state_entry_time);

I think there should be a space between PRId64 and end quote. There is another pattern to fix these kind
of errors where typecast is used e.g. (intmax_t)condition.state_entry_time, I do see this pattern used in
same file e.g. see

https://github.com/intel/thermal_daemon/blob/2d93d94c2b726c6b7695104c0f43b0cfaa533568/src/thd_gddv.cpp#L545

I think it would be good to make it consistent from upstreaming point of view,

Quoted 41 lines
meta-oe/recipes-bsp/thermald/thermald/0001-thd_gddv-fix-building-on-32-bit-systems.patch new file +3 -0
+                       if (condition.state_entry_time == 0) {
+                               condition.state_entry_time = time(nullptr);
+                               return THD_ERROR;
meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb +0 -1
index 6b193466a367..937e9a5705c2 100644
@@ -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}

<http://github.com/intel/thermal_daemon/;branch=master;protocol=https;tag=v$%7BPV%7D>
"

meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb +2 -0
+SRC_URI = " \
+    git://

github.com/intel/thermal_daemon/;branch=master;protocol=https;tag=v${PV}
<http://github.com/intel/thermal_daemon/;branch=master;protocol=https;tag=v$%7BPV%7D>
\
+ file://0001-thd_gddv-fix-building-on-32-bit-systems.patch \
+"

SRCREV = "9996a1a1cdd01d32cd411459368a177f463d0047"

--
2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#128868):
https://lists.openembedded.org/g/openembedded-devel/message/128868
Mute This Topic: https://lists.openembedded.org/mt/120656212/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-