return ll.ll_time;
#else /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) */
+# ifdef HAVE_TYPE_IN_UTMP
/* Look in wtmp for the last login */
struct utmp wt;
char *wt_file = _PATH_WTMP;
if ( wt.ut_type == USER_PROCESS) {
if ( !strncmp(logname, wt.ut_user, 8) ) {
t = (unsigned long) wt.ut_time;
-#ifdef HAVE_HOST_IN_UTMP
+# ifdef HAVE_HOST_IN_UTMP
if (bufsize > sizeof(wt.ut_host) + 1)
bufsize = sizeof(wt.ut_host) + 1;
strncpy(buf, wt.ut_host, bufsize - 1);
buf[bufsize - 1] = 0;
-#else /* HAVE_HOST_IN_UTMP */
+# else /* HAVE_HOST_IN_UTMP */
buf[0] = 0;
-#endif /* HAVE_HOST_IN_UTMP */
+# endif /* HAVE_HOST_IN_UTMP */
}
}
} while (t == 0);
return t;
+# else
+ return 0;
+# endif /* HAVE_TYPE_IN_UTMP */
#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) */
}