mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user