[git commit] Fix for the FEATURE_UTMP on the FreeBSD
Denys Vlasenko
vda.linux at googlemail.com
Mon Jan 4 20:59:40 UTC 2021
commit: https://git.busybox.net/busybox/commit/?id=4a4b453a87da91a5051a1b7be9061861ec5c01a1
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
FreeBSD is not using <utmp.h> and does not define _PATH_UTMPX.
Tested with busybox applets depending on FEATURE_UTMP (e.g. who, users, etc)
Signed-off-by: Alex Samorukov <samm at os2.kiev.ua>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
include/libbb.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/libbb.h b/include/libbb.h
index dad6fc687..cb6336474 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -106,7 +106,11 @@
# define updwtmpx updwtmp
# define _PATH_UTMPX _PATH_UTMP
# else
-# include <utmp.h>
+# if !defined(__FreeBSD__)
+# include <utmp.h>
+# else
+# define _PATH_UTMPX "/var/run/utx.active"
+# endif
# include <utmpx.h>
# if defined _PATH_UTMP && !defined _PATH_UTMPX
# define _PATH_UTMPX _PATH_UTMP
More information about the busybox-cvs
mailing list