aports/main/util-linux/utmps.patch
psykose 627190c4d2 main/util-linux: upgrade to 2.39
new in this release:
- pipesz
- blkpr
- fadvise
- waitpid

- use global ldflags for utmp instead of patching automake
- utilise lto to shave some size%
2023-05-17 12:58:53 +00:00

25 lines
690 B
Diff

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 */