]> Savannah Git Hosting - gnulib.git/commit
readutmp: work around glibc utmpx bug
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Jul 2023 00:06:42 +0000 (17:06 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Jul 2023 00:11:13 +0000 (17:11 -0700)
commitc408d9a53dbdaf48b555f216e250a2b3b8e48113
tree7a48ad4e160ccf38166f30097cf35f6c9efe83a6
parent1e209b30b4cbde8aa17a62639e62d4f36f61776b
readutmp: work around glibc utmpx bug

When compiled with _TIME_BITS=64, glibc <utmpx.h> does not work,
because the files use 32-bit time_t and the code passes this to
the user unmodified, but <utmpx.h> defines a struct with 64-bit
time_t.  Work around this compatibility bug.  Problem reported
by Jakub Wilk via Sven Joachim <https://bugs.gnu.org/64937>.
* lib/readutmp.c (copy_utmp_entry): New function.
(read_utmp): Use it.
ChangeLog
doc/glibc-functions/getutmp.texi
doc/glibc-functions/getutmpx.texi
doc/glibc-headers/utmp.texi
doc/posix-headers/utmpx.texi
doc/year2038.texi
lib/readutmp.c