summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-28 17:27:47 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-28 17:27:47 +0400
commit3fe671c49e5f3fc4798c67a57a2089bdfc6bc530 (patch)
treede93cb7fd4887663bcdf3453425d86a507a08434 /src
parentf10534112b1ad2c0ab8b0893eab3a1e15dedb506 (diff)
downloadrspamd-3fe671c49e5f3fc4798c67a57a2089bdfc6bc530.tar.gz
rspamd-3fe671c49e5f3fc4798c67a57a2089bdfc6bc530.zip
Add compatibility with glib < 2.2.22
Fix user in start script
Diffstat (limited to 'src')
-rw-r--r--src/util.c7
-rw-r--r--src/util.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 8c640bc68..df0e444c3 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1551,6 +1551,13 @@ rspamd_sprintf_num (gchar *buf, gchar *last, guint64 ui64, gchar zero,
return ((gchar *)memcpy (buf, p, len)) + len;
}
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MICRO_VERSION == 2) && (GLIB_MINOR_VERSION < 22))
+void
+g_ptr_array_unref (GPtrArray *array)
+{
+ g_ptr_array_free (array, TRUE);
+}
+#endif
/*
* vi:ts=4
diff --git a/src/util.h b/src/util.h
index 403d3447e..de5df239a 100644
--- a/src/util.h
+++ b/src/util.h
@@ -87,6 +87,9 @@ stat_file_t* get_statfile_by_symbol (statfile_pool_t *pool, struct classifier_co
const gchar *symbol, struct statfile **st, gboolean try_create);
#endif
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MICRO_VERSION == 2) && (GLIB_MINOR_VERSION < 22))
+void g_ptr_array_unref (GPtrArray *array);
+#endif
/*
* supported formats:
* %[0][width][x][X]O off_t