$NetBSD: patch-af,v 1.5 2002/10/26 18:02:17 bouyer Exp $ --- src/logging.c.orig Mon Sep 30 22:44:27 2002 +++ src/logging.c Mon Sep 30 23:00:46 2002 @@ -130,6 +130,17 @@ void rxvt_update_lastlog(const char *fname, const char *pty, const char *host) { +# if defined(RXVT_UTMP_AS_UTMPX) && !defined(SunOS) + struct lastlogx ll; + char filename[FILENAME_MAX]; + + MEMSET(&ll, 0, sizeof(ll)); + gettimeofday(&ll.ll_tv, NULL); + STRNCPY(ll.ll_line, pty, sizeof(ll.ll_line)); + STRNCPY(ll.ll_host, host, sizeof(ll.ll_host)); + + updlastlogx(RXVT_UTMPX_FILE, geteuid(), &ll); +# else # ifdef HAVE_STRUCT_LASTLOG int fd; struct passwd *pwent; @@ -165,6 +176,7 @@ } # endif /* LASTLOG_IS_DIR */ # endif /* HAVE_STRUCT_LASTLOG */ +# endif /* RXVT_UTMP_AS_UTMPX */ } #endif /* LASTLOG_SUPPORT */ /* ------------------------------------------------------------------------- */