aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Samorukov <samm@os2.kiev.ua>2021-01-04 19:35:09 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2021-01-04 21:59:40 +0100
commit4a4b453a87da91a5051a1b7be9061861ec5c01a1 (patch)
treec65d4e04504bcbfc3631221b20bc6d411c017b1d
parent0197fbffb70a78535133513278491c57a49b7aa6 (diff)
downloadbusybox-4a4b453a87da91a5051a1b7be9061861ec5c01a1.tar.gz
Fix for the FEATURE_UTMP on the FreeBSD
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@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/libbb.h6
1 files changed, 5 insertions, 1 deletions
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