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>
This commit is contained in:
Alex Samorukov 2021-01-04 19:35:09 +01:00 committed by Denys Vlasenko
parent 0197fbffb7
commit 4a4b453a87

View File

@ -106,7 +106,11 @@
# define updwtmpx updwtmp # define updwtmpx updwtmp
# define _PATH_UTMPX _PATH_UTMP # define _PATH_UTMPX _PATH_UTMP
# else # else
# if !defined(__FreeBSD__)
# include <utmp.h> # include <utmp.h>
# else
# define _PATH_UTMPX "/var/run/utx.active"
# endif
# include <utmpx.h> # include <utmpx.h>
# if defined _PATH_UTMP && !defined _PATH_UTMPX # if defined _PATH_UTMP && !defined _PATH_UTMPX
# define _PATH_UTMPX _PATH_UTMP # define _PATH_UTMPX _PATH_UTMP