[Xfce4-commits] [apps/xfce4-screensaver] 121/425: Check for logind, not for systemd

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:49:28 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit c7ffe41758c80f5c626edda4e61430be7c649542
Author: raveit65 <chat-to-me at raveit.de>
Date:   Thu Oct 3 21:08:49 2013 +0200

    Check for logind, not for systemd
---
 configure.ac           | 2 +-
 src/gs-listener-dbus.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 911f9c7..3a093c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -940,7 +940,7 @@ AC_ARG_WITH(systemd,
             [with_systemd=$withval], [with_systemd=auto])
 
 PKG_CHECK_MODULES(SYSTEMD,
-                  [libsystemd-login libsystemd-daemon],
+                  [libsystemd-login],
                   [have_systemd=yes], [have_systemd=no])
 
 if test "x$with_systemd" = "xauto" ; then
diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index e7b6c1d..dcccc33 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <glib/gi18n.h>
 
@@ -33,7 +34,6 @@
 #include <dbus/dbus-glib-lowlevel.h>
 
 #ifdef WITH_SYSTEMD
-#include <systemd/sd-daemon.h>
 #include <systemd/sd-login.h>
 #endif
 
@@ -2426,7 +2426,8 @@ gs_listener_init (GSListener *listener)
 	listener->priv = GS_LISTENER_GET_PRIVATE (listener);
 
 #ifdef WITH_SYSTEMD
-	listener->priv->have_systemd = sd_booted () > 0;
+	/* check if logind is running */
+        listener->priv->have_systemd = (access("/run/systemd/seats/", F_OK) >= 0);
 #endif
 
 	gs_listener_dbus_init (listener);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list