aboutsummaryrefslogtreecommitdiff
path: root/backend/session
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-12 16:14:18 -0500
committerGitHub <noreply@github.com>2018-11-12 16:14:18 -0500
commit77dfac4fa4082ce95fc9769861e0b971754b6a66 (patch)
treecfffb364f9e79dc7acb2dc67075b33f15a1f57c9 /backend/session
parentd2d8372cdc20c908342497fcdbfa91b6fc99df82 (diff)
parent51bfdd620e70c41e1a9fb4ce7831eddfb1bf893b (diff)
Merge pull request #1372 from emersion/config10
Use #if instead of #ifdef for wlroots config data
Diffstat (limited to 'backend/session')
-rw-r--r--backend/session/direct-ipc.c2
-rw-r--r--backend/session/logind.c4
-rw-r--r--backend/session/session.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/backend/session/direct-ipc.c b/backend/session/direct-ipc.c
index 3abce46a..2b9634da 100644
--- a/backend/session/direct-ipc.c
+++ b/backend/session/direct-ipc.c
@@ -24,7 +24,7 @@
enum { DRM_MAJOR = 226 };
-#ifdef WLR_HAS_LIBCAP
+#if WLR_HAS_LIBCAP
#include <sys/capability.h>
static bool have_permissions(void) {
diff --git a/backend/session/logind.c b/backend/session/logind.c
index b44112e6..bfe12190 100644
--- a/backend/session/logind.c
+++ b/backend/session/logind.c
@@ -15,10 +15,10 @@
#include <wlr/util/log.h>
#include "util/signal.h"
-#ifdef WLR_HAS_SYSTEMD
+#if WLR_HAS_SYSTEMD
#include <systemd/sd-bus.h>
#include <systemd/sd-login.h>
-#elif defined(WLR_HAS_ELOGIND)
+#elif WLR_HAS_ELOGIND
#include <elogind/sd-bus.h>
#include <elogind/sd-login.h>
#endif
diff --git a/backend/session/session.c b/backend/session/session.c
index 041d8f83..96cde65c 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -19,7 +19,7 @@ extern const struct session_impl session_logind;
extern const struct session_impl session_direct;
static const struct session_impl *impls[] = {
-#if defined(WLR_HAS_SYSTEMD) || defined(WLR_HAS_ELOGIND)
+#if WLR_HAS_SYSTEMD || WLR_HAS_ELOGIND
&session_logind,
#endif
&session_direct,
@@ -70,7 +70,7 @@ struct wlr_session *wlr_session_create(struct wl_display *disp) {
const char *env_wlr_session = getenv("WLR_SESSION");
if (env_wlr_session) {
if (!strcmp(env_wlr_session, "logind") || !strcmp(env_wlr_session, "systemd")) {
- #if defined(WLR_HAS_SYSTEMD) || defined(WLR_HAS_ELOGIND)
+ #if WLR_HAS_SYSTEMD || WLR_HAS_ELOGIND
session = session_logind.create(disp);
#else
wlr_log(WLR_ERROR, "wlroots is not compiled with logind support");