Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hwclock: fix for glibc 2.31 settimeofday()
glibc announce: ... settimeofday can no longer be used to set the time and the offset simultaneously. If both of its two arguments are non-null, the call will fail (setting errno to EINVAL). It means we need to call settimeofday(NULL, tz) and settimeofday(tv, NULL). Unfortunately, settimeofday(NULL, tz) has very special warp-clock semantic if used as the very first settimeofday() call. It means we have to be sure that we do not touch warp-clock if we need only need to modify system TZ. So, let's always call settimeofday(NULL, 0) before settimeofday(NULL, tz) for UTC rtc mode when modify system TZ. CC: J William Piggott <elseifthen@gmx.com> Signed-off-by: Karel Zak <kzak@redhat.com> Addresses: #957
- Loading branch information