From ac570cb938211b131d44b70e551213f34278946f Mon Sep 17 00:00:00 2001
From: Amin Ben Romdhane <amin.benromdhane@iopsys.eu>
Date: Mon, 18 Nov 2024 11:05:18 +0100
Subject: [PATCH] Fix compilation error

---
 src/memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/memory.c b/src/memory.c
index a9b0ca0..c238064 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -173,7 +173,7 @@ static void run_memory_monitor(void)
 
 		// Update CriticalRiseTimeStamp to the current time
 		g_memory_ctx.critical_rise_time = time(NULL);
-		snprintf(buf, sizeof(buf), "%ld", g_memory_ctx.critical_rise_time);
+		snprintf(buf, sizeof(buf), "%ld", (long int)g_memory_ctx.critical_rise_time);
 		sysmngr_uci_set("sysmngr", "memory", "critical_rise_time", buf);
 
 		if (g_memory_ctx.enable_critical_log) {
@@ -192,7 +192,7 @@ static void run_memory_monitor(void)
 
 		// Update CriticalFallTimeStamp to the current time
 		g_memory_ctx.critical_fall_time = time(NULL);
-		snprintf(buf, sizeof(buf), "%ld", g_memory_ctx.critical_fall_time);
+		snprintf(buf, sizeof(buf), "%ld", (long int)g_memory_ctx.critical_fall_time);
 		sysmngr_uci_set("sysmngr", "memory", "critical_fall_time", buf);
 
 		if (g_memory_ctx.enable_critical_log) {
-- 
GitLab