mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
kernel-symbol: respect ENABLE_POLKIT setting
This fixes the compilation when we have sysprofd fully disabled. That is not an ideal configuration, but keeping it working ensures that some of the code is easy copy/paste'able in the future for some situations.
This commit is contained in:
@ -18,8 +18,13 @@
|
||||
|
||||
#define G_LOG_DOMAIN "sp-kernel-symbol"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <polkit/polkit.h>
|
||||
|
||||
#ifdef ENABLE_POLKIT
|
||||
# include <polkit/polkit.h>
|
||||
#endif
|
||||
|
||||
#include "sp-kallsyms.h"
|
||||
|
||||
@ -87,6 +92,7 @@ type_is_ignored (guint8 type)
|
||||
static gboolean
|
||||
authorize_proxy (GDBusConnection *conn)
|
||||
{
|
||||
#ifdef ENABLE_POLKIT
|
||||
PolkitSubject *subject = NULL;
|
||||
GPermission *permission = NULL;
|
||||
const gchar *name;
|
||||
@ -113,6 +119,7 @@ authorize_proxy (GDBusConnection *conn)
|
||||
failure:
|
||||
g_clear_object (&subject);
|
||||
g_clear_object (&permission);
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user