Apparently the polkit_authority_get() function was deprecated in some recent PolicyKit release:
CC udisks_daemon-daemon.o cc1: warnings being treated as errors daemon.c: In function ‘register_disks_daemon’: daemon.c:1797:3: error: ‘polkit_authority_get’ is deprecated (declared at /usr/include/polkit-1/polkit/polkitauthority.h:50): Use polkit_authority_get_sync instead This patch changes that call to use polkit_authority_get_sync() instead. It builds and works for me, but since I haven't done much Gnome development before, it should be thoroughly scrutinized. (Is it OK to attach patches instead of posting them inline? I have been spoilt by Gmail) Regards, Marti
From 3220f7b7d2960e404dcb5e5d922ad9efb124af37 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp <ma...@juffo.org> Date: Wed, 20 Oct 2010 19:39:02 +0300 Subject: [PATCH 2/2] udisks: Avoid deprecated polkit_authority_get() function Use polkit_authority_get_sync() instead. Signed-off-by: Marti Raudsepp <ma...@juffo.org> --- src/daemon.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/daemon.c b/src/daemon.c index d46c6da..afcd8fb 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -1794,7 +1794,16 @@ register_disks_daemon (Daemon *daemon) "sas_expander", /* SAS Expanders */ NULL }; - daemon->priv->authority = polkit_authority_get (); + daemon->priv->authority = polkit_authority_get_sync ((GCancellable *) NULL, &error); + if (daemon->priv->authority == NULL) + { + if (error != NULL) + { + g_critical ("error getting authority reference: %s", error->message); + g_error_free (error); + } + goto error; + } error = NULL; daemon->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); -- 1.7.3.1
_______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel