diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 7 | ||||
-rw-r--r-- | src/util.h | 3 |
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 |