$NetBSD: patch-ae,v 1.7 2025/10/20 18:32:10 vins Exp $ * Check for lastlogx struct support. * Define RXVT_LASTLOGX_FILE. --- src/logging.h.orig 2002-10-01 04:33:47.000000000 +0000 +++ src/logging.h @@ -15,6 +15,14 @@ # endif # include +#if defined(HAVE_STRUCT_LASTLOGX) && !defined(RXVT_LASTLOGX_FILE) +# if defined(__NetBSD__) && defined(HAVE_UTMPX_H) +# define RXVT_LASTLOGX_FILE _PATH_LASTLOGX +# else +# define RXVT_LASTLOGX_FILE "@VARBASE@/log/lastlogx" +# endif +#endif + # ifdef RXVT_UTMP_SYSV # ifndef USER_PROCESS # define USER_PROCESS 7 @@ -31,4 +39,13 @@ #include "logging.intpro" /* PROTOS for internal routines */ #endif + +/* lastlogx support is incomplete on the NetBSD 1.6-branch -- disable it */ +#ifdef __NetBSD__ +# include +# if __NetBSD_Version__ >= 106000000 && __NetBSD_Version__ < 106010000 +# undef HAVE_STRUCT_LASTLOGX +# endif +#endif + #endif /* _LOGGING_H_ */