aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-16 16:44:33 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-16 16:44:33 +0000
commita8ba838fc116cade384bbadb013fc181121d480b (patch)
treedd8893cd7ccb50f30fe5209aec68112279ed09f3 /src/libutil/util.c
parent1f426dddc9ca736b0a1efecf6cad3552069d7a34 (diff)
downloadrspamd-a8ba838fc116cade384bbadb013fc181121d480b.tar.gz
rspamd-a8ba838fc116cade384bbadb013fc181121d480b.zip
Add another bloody workaround for old glib
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r--src/libutil/util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c
index ed9d78abe..286ec5091 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -1352,6 +1352,22 @@ g_ptr_array_new_full (guint reserved_size,
return array;
}
#endif
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 32))
+void
+g_queue_free_full (GQueue *queue, GDestroyNotify free_func)
+{
+ GList *cur;
+
+ cur = queue->head;
+
+ while (cur) {
+ free_func (cur->data);
+ cur = g_list_next (cur);
+ }
+
+ g_queue_free (queue);
+}
+#endif
guint
rspamd_url_hash (gconstpointer u)