From 20f6e05f047d2b495eec59f1783e7b71369296f6 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Thu, 14 Oct 2021 13:50:38 -0700 Subject: [PATCH] [Memory64] strftime changes for 64-bit --- system/lib/libc/musl/src/time/strftime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/lib/libc/musl/src/time/strftime.c b/system/lib/libc/musl/src/time/strftime.c index e21a3513c165b..cc4fb9a52956c 100644 --- a/system/lib/libc/musl/src/time/strftime.c +++ b/system/lib/libc/musl/src/time/strftime.c @@ -181,9 +181,9 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * *l = 0; return ""; } - *l = snprintf(*s, sizeof *s, "%+.2ld%.2d", // XXX EMSCRIPTEN: %d => %ld + *l = snprintf(*s, sizeof *s, "%+.2ld%.2ld", // XXX EMSCRIPTEN: %d => %ld (tm->__tm_gmtoff)/3600, - abs(tm->__tm_gmtoff%3600)/60); + labs(tm->__tm_gmtoff%3600)/60); // XXX EMSCRIPTEN: abs => labs return *s; case 'Z': if (tm->tm_isdst < 0) {