libnwck/libnwck3: use time_t to avoid build failure

The time_t type varies for 64bit and 32bit. So instead of using
long long, we should just use time_t. In this way, things build
for both 64bit and 32bit targets.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Chen Qi 2025-09-08 02:16:19 -07:00 committed by Khem Raj
parent bad66d976e
commit 15a204024d
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Refresh the patch Refresh the patch
Don't use explicit type cast to avoid truncation, use long long for tv_sec. Don't use explicit type cast to avoid truncation, use time_t for tv_sec.
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Changqing Li <changqing.li@windriver.com>
@ -40,7 +40,7 @@ index 7418f89..f0f30b2 100644
GList *tmp; GList *tmp;
gint64 now; gint64 now;
- long tv_sec, tv_usec; - long tv_sec, tv_usec;
+ long long tv_sec; + time_t tv_sec;
+ long tv_usec; + long tv_usec;
double elapsed; double elapsed;

View File

@ -32,7 +32,7 @@ index 4f0c6c4..758fc5f 100644
GList *tmp; GList *tmp;
GTimeVal now; GTimeVal now;
- long tv_sec, tv_usec; - long tv_sec, tv_usec;
+ long long tv_sec; + time_t tv_sec;
+ long tv_usec; + long tv_usec;
double elapsed; double elapsed;