[PATCH] Fix for the FEATURE_UTMP on the FreeBSD
Denys Vlasenko
vda.linux at googlemail.com
Mon Jan 4 21:00:53 UTC 2021
Applied, thank you.
On Mon, Jan 4, 2021 at 7:35 PM Alex Samorukov <samm at os2.kiev.ua> wrote:
>
> 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>
> ---
> 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
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
More information about the busybox
mailing list