From 77a51a2709de1b646ab493f0bf771d896de6efc2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 29 Dec 2020 16:53:11 +0100 Subject: randomconfig fixes Signed-off-by: Denys Vlasenko --- loginutils/login.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loginutils') diff --git a/loginutils/login.c b/loginutils/login.c index de05631..21c32fc 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -341,7 +341,7 @@ int login_main(int argc UNUSED_PARAM, char **argv) #if ENABLE_LOGIN_SESSION_AS_CHILD pid_t child_pid; #endif - pid_t my_pid; + IF_FEATURE_UTMP(pid_t my_pid;) INIT_G(); @@ -524,7 +524,7 @@ int login_main(int argc UNUSED_PARAM, char **argv) if (pw->pw_uid != 0) die_if_nologin(); - my_pid = getpid(); + IF_FEATURE_UTMP(my_pid = getpid();) update_utmp(my_pid, USER_PROCESS, short_tty, username, run_by_root ? opt_host : NULL); #if ENABLE_LOGIN_SESSION_AS_CHILD -- cgit v1.1