]> 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)
committerBruno Haible <bruno@clisp.org>
Wed, 16 Aug 2023 16:49:49 +0000 (18:49 +0200)
commit10af618132f48f76ab2a8e3de48eae562032d1b2
treef4c127d3a7643e84963af588c18d36794540027d
parent5b6b579b8cd211f4f9786322e338ca679a411d17
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