From e4e79233e2a806e8e6735c715505ef7a6fd56215 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 8 Mar 2018 12:04:44 -0500 Subject: [PATCH] compilation fix for glib < 2.32 (CentOS 6) closes #485 Change-Id: I4d6be802503ba9334fe0687ec869335ada0fcc3f --- daemon/aux.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon/aux.h b/daemon/aux.h index 5a2aace6c..9c7b17fb3 100644 --- a/daemon/aux.h +++ b/daemon/aux.h @@ -90,6 +90,12 @@ GList *g_list_link(GList *, GList *); INLINE int g_hash_table_contains(GHashTable *h, const void *k) { return g_hash_table_lookup(h, k) ? 1 : 0; } +INLINE void g_queue_free_full(GQueue *q, GDestroyNotify free_func) { + void *d; + while ((d = g_queue_pop_head(q))) + free_func(d); + g_queue_free(q); +} #endif