diff options
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/login-util.h | 5 | ||||
-rw-r--r-- | src/basic/util.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/basic/login-util.h b/src/basic/login-util.h index a79f20c1b1..be5bb64870 100644 --- a/src/basic/login-util.h +++ b/src/basic/login-util.h @@ -22,5 +22,10 @@ #pragma once #include <stdbool.h> +#include <unistd.h> bool session_id_valid(const char *id); + +static inline bool logind_running(void) { + return access("/run/systemd/seats/", F_OK) >= 0; +} diff --git a/src/basic/util.h b/src/basic/util.h index 7d1e4e0f62..d1da9ce106 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -617,10 +617,6 @@ static inline unsigned log2u_round_up(unsigned x) { return log2u(x - 1) + 1; } -static inline bool logind_running(void) { - return access("/run/systemd/seats/", F_OK) >= 0; -} - #define DECIMAL_STR_WIDTH(x) \ ({ \ typeof(x) _x_ = (x); \ |