clock_adjtime: generalize time64 not to assume old struct layout match
authorRich Felker <dalias@aerifal.cx>
Sun, 20 Oct 2019 05:43:22 +0000 (01:43 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 20 Oct 2019 05:43:22 +0000 (01:43 -0400)
commit928674dcd0c5c643b8a4440466103be841151f5e
tree8a3af196a753e9aca618ff96b78e7bf3e69976ba
parent5850546e9669f793aab61dfc7c4f2c1ff35c4b29
clock_adjtime: generalize time64 not to assume old struct layout match

commit 2b4fd6f75b4fa66d28cddcf165ad48e8fda486d1 added time64 for this
function, but did so with a hidden assumption that the new time64
version of struct timex will be layout-compatible with the old one.
however, there is little benefit to doing it that way, and the cost is
permanent special-casing of 32-bit archs with 64-bit time_t in the
public interface definitions.

instead, do a full translation of the structure going in and out. this
commit is actually a revision to an earlier uncommited version of the
code.
src/linux/clock_adjtime.c