dnl CF_STRUCT_LASTLOG version: 3 updated: 2020/03/10 18:53:47
dnl -----------------
dnl Check for header defining struct lastlog, ensure that its .ll_time member
dnl is compatible with time().
AC_DEFUN([CF_STRUCT_LASTLOG],
[
AC_CHECK_HEADERS(lastlog.h)
AC_CACHE_CHECK(for struct lastlog,cf_cv_struct_lastlog,[
AC_TRY_RUN([
#include <sys/types.h>
#include <time.h>
#include <lastlog.h>

int main(void)
{
	struct lastlog data;
	return (sizeof(data.ll_time) != sizeof(time_t));
}],[
cf_cv_struct_lastlog=yes],[
cf_cv_struct_lastlog=no],[
cf_cv_struct_lastlog=unknown])])

test $cf_cv_struct_lastlog != no && AC_DEFINE(USE_STRUCT_LASTLOG,1,[Define to 1 if we have struct lastlog])
])dnl
