[PATCH] xfce4-session systemd support: polkit_unix_process_new is deprecated
Baurzhan Muftakhidinov
baurthefirst at gmail.com
Thu Apr 3 09:19:45 CEST 2014
Hello,
While building latest dev release of xfce4-session on Fedora 20
I have noticed the next warning
xfsm-systemd.c:79:3: warning: 'polkit_unix_process_new' is deprecated
(declared at /usr/include/polkit-1/polkit/polkitunixprocess.h:51): Use
polkit_unix_process_new_for_owner instead [-Wdeprecated-declarations]
systemd->subject = polkit_unix_process_new (getpid());
^
Below is the simple patch to fix that
diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c
index 7bdd39d..90f8e2d 100644
--- a/xfce4-session/xfsm-systemd.c
+++ b/xfce4-session/xfsm-systemd.c
@@ -76,7 +76,7 @@ static void
xfsm_systemd_init (XfsmSystemd *systemd)
{
systemd->authority = polkit_authority_get_sync (NULL, NULL);
- systemd->subject = polkit_unix_process_new (getpid());
+ systemd->subject = polkit_unix_process_new_for_owner (getpid(), 0, -1);
}
More information about the Xfce4-dev
mailing list