From: Yu Watanabe Date: Mon, 8 Sep 2025 06:08:49 +0000 (+0900) Subject: musl: time-util: skip tm.tm_wday check X-Git-Tag: v259-rc1~81^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d5b306bb9901c7744bd79c7ceb38dcd93a48743;p=thirdparty%2Fsystemd.git musl: time-util: skip tm.tm_wday check musl does not set tm_wday when it is explicitly requested. The check is not necessary at all, it is just for safety. Let's skip it when built with musl. --- diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 8e0d4cc0304..40d1bf1e090 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -889,7 +889,11 @@ static int parse_timestamp_impl( if (!k || *k != ' ') continue; +#ifdef __GLIBC__ + /* musl does not set tm_wday field and set 0 unless it is explicitly requested by %w or so. + * In the below, let's only check tm_wday field only when built with glibc. */ weekday = day->nr; +#endif t = k + 1; break; }