aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2013-12-09 12:40:25 -0500
committerJon Lund Steffensen <jonlst@gmail.com>2013-12-09 12:40:25 -0500
commit9e1457a24844cb80cc3e200f08079eb0ecab1c3d (patch)
tree53c0027c19c323dbf4aa90940e08b44c612d7a1b
parentDo not allow NULL keys when setting options (diff)
downloadredshift-ng-9e1457a24844cb80cc3e200f08079eb0ecab1c3d.tar.gz
redshift-ng-9e1457a24844cb80cc3e200f08079eb0ecab1c3d.tar.bz2
redshift-ng-9e1457a24844cb80cc3e200f08079eb0ecab1c3d.tar.xz
geoclue: Disable deprecated g_type_init() when glib >= 2.35
-rw-r--r--src/location-geoclue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/location-geoclue.c b/src/location-geoclue.c
index 6d33a59..5be651f 100644
--- a/src/location-geoclue.c
+++ b/src/location-geoclue.c
@@ -24,6 +24,9 @@
#include <geoclue/geoclue-master.h>
#include <geoclue/geoclue-position.h>
+#include <glib.h>
+#include <glib-object.h>
+
#include "location-geoclue.h"
#ifdef ENABLE_NLS
@@ -39,8 +42,10 @@
int
location_geoclue_init(location_geoclue_state_t *state)
{
+#if !GLIB_CHECK_VERSION(2, 35, 0)
g_type_init();
-
+#endif
+
state->position = NULL;
state->provider = NULL;
state->provider_path = NULL;