]> 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 17:29:57 +0000 (19:29 +0200)
commitaa088f4405bfda589796a046fe5c842e77389913
tree102327dd656964ef7959bff3305c89c9595f8dd0
parentafec3afeed7523e97210f6833d4d32e7e6541541
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
lib/readutmp.c