generic: do not assume certain systems have utmpx

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-02-23 05:04:38 +02:00
parent 1e401eaa96
commit 76765eee7d

View file

@ -100,11 +100,7 @@ if (UNIX)
set(UTIL_LIBRARY util)
endif (login_in_libutil)
endif (NOT login_in_libc)
if (CMAKE_SYSTEM_NAME MATCHES "(Linux|GNU|FreeBSD)")
set (HAVE_UTMPX)
else ()
check_function_exists(getutxent HAVE_UTMPX)
endif ()
check_function_exists(setutxent HAVE_UTMPX)
if (HAVE_UTMPX)
set(utmp utmpx)
if (login_in_libutil)