[sysprof] perf: polkit is optional for the library
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] perf: polkit is optional for the library
- Date: Sun, 17 Apr 2016 00:14:58 +0000 (UTC)
commit 4479c56135741fe3d96edc5bca9801d8db7e2ebd
Author: Christian Hergert <christian hergert me>
Date: Sat Apr 16 17:13:56 2016 -0700
perf: polkit is optional for the library
So changing this was a little backwards. The goal here is to allow using
libsysprof-2 without polkit, it just won't have the ability to elevate
privileges.
lib/Makefile.am | 2 --
lib/sp-perf-counter.c | 5 ++++-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 5b51686..3e67fd1 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -99,7 +99,6 @@ libsysprof_ API_VERSION@_la_SOURCES = \
libsysprof_ API_VERSION@_la_CFLAGS = \
-I$(srcdir)/util \
$(GIO_CFLAGS) \
- $(POLKIT_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -107,7 +106,6 @@ libsysprof_ API_VERSION@_la_LIBADD = \
libutil.la \
-lstdc++ \
$(GIO_LIBS) \
- $(POLKIT_LIBS) \
$(NULL)
if ENABLE_SYSPROFD
diff --git a/lib/sp-perf-counter.c b/lib/sp-perf-counter.c
index a6fad7a..ed3a114 100644
--- a/lib/sp-perf-counter.c
+++ b/lib/sp-perf-counter.c
@@ -42,13 +42,16 @@
#include <errno.h>
#include <gio/gio.h>
#include <gio/gunixfdlist.h>
-#include <polkit/polkit.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <unistd.h>
+#ifdef ENABLE_SYSPROFD
+# include <polkit/polkit.h>
+#endif
+
#include "sp-perf-counter.h"
#include "util.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]