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.
This commit is contained in:
Yu Watanabe
2025-09-08 15:08:49 +09:00
parent 6431f2e072
commit 8d5b306bb9

View File

@@ -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;
}