$NetBSD: patch-ab,v 1.4 2023/10/16 20:55:52 triaxx Exp $ Add NetBSD Path, and include stdlib.h for everyone (malloc) --- chklastlog.c.orig 2014-05-06 10:12:14.000000000 +0000 +++ chklastlog.c @@ -37,9 +37,7 @@ int main () { return 0; } #else #include -#ifdef __linux__ #include -#endif #include #include #include @@ -56,19 +54,23 @@ int main () { return 0; } #endif #ifdef __FreeBSD__ -#define WTMP_FILENAME "/var/log/wtmp" -#define LASTLOG_FILENAME "/var/log/lastlog" +#define WTMP_FILENAME "@VARBASE@/log/wtmp" +#define LASTLOG_FILENAME "@VARBASE@/log/lastlog" +#endif +#ifdef __NetBSD__ +#define WTMP_FILENAME "@VARBASE@/log/wtmp" +#define LASTLOG_FILENAME "@VARBASE@/log/lastlog" #endif #ifdef __OpenBSD__ #include -#define WTMP_FILENAME "/var/log/wtmp" -#define LASTLOG_FILENAME "/var/log/lastlog" +#define WTMP_FILENAME "@VARBASE@/log/wtmp" +#define LASTLOG_FILENAME "@VARBASE@/log/lastlog" #endif #ifndef WTMP_FILENAME -#define WTMP_FILENAME "/var/adm/wtmp" +#define WTMP_FILENAME "@VARBASE@/adm/wtmp" #endif #ifndef LASTLOG_FILENAME -#define LASTLOG_FILENAME "/var/adm/lastlog" +#define LASTLOG_FILENAME "@VARBASE@/adm/lastlog" #endif #define TRUE 1L