diff options
author | Luca Boccassi <bluca@debian.org> | 2023-11-08 21:01:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 21:01:39 +0100 |
commit | 3e433afac9566e5a7699ee1b7b9a0d34f04da744 (patch) | |
tree | 74e3737e2335114a3244d96c3c244f08f1a367ad | |
parent | Merge pull request #29927 from yuwata/resolve-mdns-fixlets (diff) | |
parent | ci: add -Dutmp=false coverage (diff) | |
download | systemd-3e433afac9566e5a7699ee1b7b9a0d34f04da744.tar.xz systemd-3e433afac9566e5a7699ee1b7b9a0d34f04da744.zip |
Merge pull request #29942 from bluca/executor_no_utmp
core: fix build with -Dutmp=false
-rwxr-xr-x | .github/workflows/build_test.sh | 2 | ||||
-rw-r--r-- | src/core/exec-invoke.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/.github/workflows/build_test.sh b/.github/workflows/build_test.sh index 99dadd2228..c550046761 100755 --- a/.github/workflows/build_test.sh +++ b/.github/workflows/build_test.sh @@ -9,7 +9,7 @@ success() { echo >&2 -e "\033[32;1m$1\033[0m"; } ARGS=( "--optimization=0 -Dopenssl=disabled -Dcryptolib=gcrypt -Ddns-over-tls=gnutls -Dtpm=true -Dtpm2=enabled" - "--optimization=s" + "--optimization=s -Dutmp=false" "--optimization=3 -Db_lto=true -Ddns-over-tls=false" "--optimization=3 -Db_lto=false -Dtpm2=disabled -Dlibfido2=disabled -Dp11kit=disabled" "--optimization=3 -Ddns-over-tls=openssl" diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index 245e9b5a3d..38af3b488d 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -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); |