From: Jakub Jirutka Date: Mon, 20 Dec 2021 18:52:00 +0100 Subject: [PATCH] Add support for utmps The following programs use utmpx.h: last, login, lslogins, agetty, wall, write. Programs 'su' and 'runuser' include utmpx.h, but use only btmp which is not supported on Alpine. --- a/include/pathnames.h +++ b/include/pathnames.h @@ -214,5 +214,13 @@ #define _PATH_DEV_RFKILL "/dev/rfkill" #define _PATH_SYS_RFKILL "/sys/class/rfkill" +#ifdef UTMPS_UTMPX_H +/* override stub paths from with ones for utmps */ +# undef _PATH_UTMP +# define _PATH_UTMP UTMPX_FILE +# undef _PATH_WTMP +# define _PATH_WTMP "/var/log/wtmp" +#endif + #endif /* PATHNAMES_H */