diff options
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r-- | src/libutil/util.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index a86f67b48..6efe1b477 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1463,6 +1463,20 @@ g_queue_clear (GQueue *queue) queue->length = 0; } #endif +#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 30)) +GPtrArray* +g_ptr_array_new_full (guint reserved_size, + GDestroyNotify element_free_func) +{ + GPtrArray *array; + + array = g_ptr_array_sized_new (reserved_size); + g_ptr_array_set_free_func (array, element_free_func); + + return array; +} +#endif + gsize rspamd_strlcpy (gchar *dst, const gchar *src, gsize siz) |