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 <[email protected]>
---
 include/libbb.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/libbb.h b/include/libbb.h
index dad6fc687..664bf0410 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -106,7 +106,11 @@
 #  define updwtmpx updwtmp
 #  define _PATH_UTMPX _PATH_UTMP
 # else
+#ifndef __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
-- 
2.29.1

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to