diff mbox series

[meta-oe] thermald: fix building on 32-bit ARM systems

Message ID 20260808124744.468104-1-dmitry.baryshkov@oss.qualcomm.com
State New
Headers show
Series [meta-oe] thermald: fix building on 32-bit ARM systems | expand

Commit Message

Dmitry Baryshkov Aug. 8, 2026, 12:47 p.m. UTC
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 <dmitry.baryshkov@oss.qualcomm.com>
---
 ..._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

Comments

Khem Raj Aug. 8, 2026, 3:51 p.m. UTC | #1
On Sat, Aug 8, 2026 at 5:47 AM Dmitry Baryshkov via lists.openembedded.org
<dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:

> 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 <dmitry.baryshkov@oss.qualcomm.com>
> ---
>  ..._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 <dmitry.baryshkov@oss.qualcomm.com>
> +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 <dmitry.baryshkov@oss.qualcomm.com>
> +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);
>

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,


> +                       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}
> <http://github.com/intel/thermal_daemon/;branch=master;protocol=https;tag=v$%7BPV%7D>
> "
> +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: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

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 <dmitry.baryshkov@oss.qualcomm.com>
+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 <dmitry.baryshkov@oss.qualcomm.com>
+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"