From 807690fb7f7e4998e2bb67f32026ab9f1c7b8077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 4 Sep 2018 09:34:16 +0200 Subject: [PATCH] systemctl: fix compilation w/o logind Fixes #10006. --- src/systemctl/systemctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index ff204cd789..9ddd40a48e 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -8509,8 +8509,8 @@ static int halt_now(enum action a) { } } +#if ENABLE_LOGIND static int logind_schedule_shutdown(void) { - _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; char date[FORMAT_TIMESTAMP_MAX]; const char *action; @@ -8563,6 +8563,7 @@ static int logind_schedule_shutdown(void) { log_info("Shutdown scheduled for %s, use 'shutdown -c' to cancel.", format_timestamp(date, sizeof(date), arg_when)); return 0; } +#endif static int halt_main(void) { int r;