On 30/07/2023 01:30, Paul Eggert wrote:
On 2023-07-29 12:44, Pádraig Brady wrote:
I tried a quick build with -D__WORDSIZE_TIME64_COMPAT32=1
which is what glibc uses to force the smaller time types.
However that didn't fix the issue, so I'll need to look a bit more,
and how to get only utmp access restricted to 32 bit types.
I looked into that, and installed the attached patches into Gnulib and
Coreutils respectively; these should work around the problem so I'll
boldly close the bug report.
These patches are quite a hack, though, and (obviously) stop working
after the year 2038.
What's Debian's and/or Fedora's plan for fixing <utmp.h>/<utmpx.h>'s
Y2038 bugs? (Or is the idea to remove the <utmp.h></utmpx.h> API before
2038? :-)
See:
https://lwn.net/Articles/925068/
https://sourceware.org/glibc/wiki/Y2038ProofnessDesign#utmp_types_and_APIs
Thanks Paul.
Yes I think the consensus is to switch away from the utmp API,
which was recently discussed at:
https://lists.gnu.org/archive/html/coreutils/2023-06/msg00024.html
cheers,
Pádraig