core: fix build with -Dutmp=false

This commit is contained in:
Luca Boccassi
2023-11-08 18:41:47 +00:00
parent e5883df89f
commit de3612dbd7
+2
View File
@@ -4369,6 +4369,7 @@ int exec_invoke(
}
}
#if ENABLE_UTMP
if (context->utmp_id) {
const char *line = context->tty_path ?
(path_startswith(context->tty_path, "/dev/") ?: context->tty_path) :
@@ -4380,6 +4381,7 @@ int exec_invoke(
USER_PROCESS,
username);
}
#endif
if (uid_is_valid(uid)) {
r = chown_terminal(STDIN_FILENO, uid);