diff options
author | BenoƮt Monin <benoit.monin-ext@alstomgroup.com> | 2021-07-09 11:37:20 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-07-09 10:07:52 +0000 |
commit | dc66ee2aaadefd56f17681e95454748a958d96f3 (patch) | |
tree | 52eb084948c843b18a8c4757bba1bb1545410c80 | |
parent | 63f3dcb2fe3dee42fe223751c5394a751e7ecc42 (diff) |
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
-rw-r--r-- | libmm-glib/mm-common-helpers.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libmm-glib/mm-common-helpers.c b/libmm-glib/mm-common-helpers.c index 8c3415ff..1f146f6f 100644 --- a/libmm-glib/mm-common-helpers.c +++ b/libmm-glib/mm-common-helpers.c @@ -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 */ |