From b21fbcbcb1ad5907675b59cf1001c5a9f4f3928f Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Fri, 22 Dec 2023 18:15:18 -0800 Subject: [PATCH] subr_settime should avoid settimeofday() completely in Emscripten environment --- src/timer.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/timer.c b/src/timer.c index 2cb14c2..08a5874 100644 --- a/src/timer.c +++ b/src/timer.c @@ -73,11 +73,6 @@ extern int ether_fd; extern DspInterface currentdsp; #endif /* XWINDOW */ -#ifdef MAIKO_OS_EMSCRIPTEN -/* We can't touch the system clock */ -#define settimeofday(tv, tz) -#endif - #define LISP_UNIX_TIME_DIFF 29969152 #define LISP_ALTO_TIME_MASK 0x80000000 #define UNIX_ALTO_TIME_DIFF 2177452800U @@ -293,6 +288,8 @@ void subr_settime(LispPTR args[]) dosday.year = uxtime.tm_year; dosday.dayofweek = uxtime.tm_wday; _dos_setdate(&dosday); +#elif defined(MAIKO_OS_EMSCRIPTEN) + (void)args[0]; #else struct timeval timev; timev.tv_sec = *((int *)NativeAligned4FromLAddr(args[0])) - UNIX_ALTO_TIME_DIFF;