From 79ddd58ef6bfbdc40da29e2f23fc3b91c8c51045 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sun, 31 Aug 2025 13:57:22 +0200 Subject: [PATCH] configure.ac, lib/: Use _PATH_WTMP from That's the libc macro for this file. Signed-off-by: Alejandro Colomar --- configure.ac | 2 -- lib/utmp.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b52402961..71697e7aa 100644 --- a/configure.ac +++ b/configure.ac @@ -98,8 +98,6 @@ AC_CACHE_CHECK([location of faillog/lastlog/wtmp], [shadow_cv_logdir], break fi done]) -AC_DEFINE_UNQUOTED([_WTMP_FILE], ["$shadow_cv_logdir/wtmp"], - [Path for wtmp file.]) AC_DEFINE_UNQUOTED([FAILLOG_FILE], ["$shadow_cv_logdir/faillog"], [Path for faillog file.]) diff --git a/lib/utmp.c b/lib/utmp.c index f4d0783e8..4aa2a9096 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -381,7 +382,7 @@ setutmp(struct utmpx *ut) #if !defined(USE_PAM) /* This is done by pam_lastlog */ - updwtmpx(_WTMP_FILE, ut); + updwtmpx(_PATH_WTMP, ut); #endif return err; -- 2.47.3