From 8108e0cd9e8eb85a7e77fca1de223304460189ab Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Mon, 8 Apr 2024 11:49:03 -0700
Subject: [PATCH] Address MSVC warning and CID 492209 with typecast of time_t
 to uint32_t

yes, this is a Y2K38 (or Y2106) issue, but we should have that worked out
when upgrading to the next libmozjs.

Need something like NUMBER_TO_JSVAL() and equivalent LAZY_NUMBER macro that
can deal with >32-bit ints correctly (or just always convert to double?).
---
 src/sbbs3/js_system.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/js_system.c b/src/sbbs3/js_system.c
index 081477fece..f23220c1aa 100644
--- a/src/sbbs3/js_system.c
+++ b/src/sbbs3/js_system.c
@@ -2695,7 +2695,7 @@ static JSBool js_system_resolve(JSContext *cx, JSObject *obj, jsid id)
 	LAZY_STRING("git_branch", git_branch);
 	LAZY_STRING("git_hash", git_hash);
 	LAZY_STRING("git_date", git_date);
-	LAZY_INTEGER("git_time", git_time);
+	LAZY_INTEGER("git_time", (uint32_t)git_time);
 
 	LAZY_STRING("platform", PLATFORM_DESC);
 	LAZY_STRING("architecture", ARCHITECTURE_DESC);
-- 
GitLab