[Libguestfs] [v2v PATCH] libosinfo: declare OsinfoList auto-cleanup with glib < 2.63.3

Pino Toscano ptoscano at redhat.com
Mon Jun 1 07:15:24 UTC 2020


Starting from glib 2.63.3, Module classes have already auto-cleanup
functions declared for them.

Reported by: Kevin Locke.
---
 v2v/libosinfo-c.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/v2v/libosinfo-c.c b/v2v/libosinfo-c.c
index 1ab6bb4d..e6827f76 100644
--- a/v2v/libosinfo-c.c
+++ b/v2v/libosinfo-c.c
@@ -44,7 +44,9 @@
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoFilter, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref)
+#if !GLIB_CHECK_VERSION(2, 63, 3)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoList, g_object_unref)
+#endif
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoOsList, g_object_unref)
 
 typedef OsinfoDb *OsinfoDb_t;
-- 
2.25.4




More information about the Libguestfs mailing list