diff options
Diffstat (limited to 'main/util-linux/utmps.patch')
-rw-r--r-- | main/util-linux/utmps.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/main/util-linux/utmps.patch b/main/util-linux/utmps.patch new file mode 100644 index 00000000000..529bb2ac95e --- /dev/null +++ b/main/util-linux/utmps.patch @@ -0,0 +1,25 @@ +From: Jakub Jirutka <jakub@jirutka.cz> +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 <paths.h> 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 */ |