libmm-glib,common-helpers: fix build with glib 2.56

The support of autoptr for GEnumClass and GFlagsClass was introduced in
glib 2.58. To keep compatibility with glib 2.56, declare the autoptr
cleanup functions.

Fixes #397
This commit is contained in:
Benoît Monin
2021-07-09 11:37:20 +02:00
committed by Aleksander Morgado
parent 63f3dcb2fe
commit dc66ee2aaa

View File

@@ -25,6 +25,11 @@
#include "mm-errors-types.h"
#include "mm-common-helpers.h"
#if (!GLIB_CHECK_VERSION (2, 58, 0))
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEnumClass, g_type_class_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFlagsClass, g_type_class_unref)
#endif
/******************************************************************************/
/* Enums/flags to string builders */