Hi,
On Sun, Jul 30, Paul Eggert wrote: > Thorsten's draft coreutils patches > <https://github.com/thkukuk/utmpx/tree/main/patches/coreutils> are a bit > long, and I'm hoping we can simplify this by packaging the fix inside > Gnulib (much as we already packaged the fix for <utmpx.h> not working on > 32-bit GNU/Linux x86 and ARM when _TIME_BITS is 64[1]), so that we > needn't patch Coreutils other than to upgrade Gnulib version. If you haven't seen yet, I made some time ago a mapping between utmp struct entries and libsystemd functions: https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md But be aware: 1. you need to extend ut_tv from 32bit time_t to 64bit time_t, or your patch will not survive 2038. 2. the string entries are size limited in struct utmp, but are not with libsystemd. So could be that you need to truncate device names, user names and host names. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nuernberg, Germany Managing Director: Ivo Totev, Andrew McDonald, Werner Knoblich (HRB 36809, AG Nürnberg)