summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-11-09 08:47:10 +0100
committerThomas Haller <thaller@redhat.com>2019-11-09 08:49:45 +0100
commit669e0b981d2c5f4988a7e298aada3e404cd07e22 (patch)
tree27ad887009a4dbf2ee21dd09961d1bdfd90788a8
parentba8a5ee100935223e1b7059ee8a99a00905868c6 (diff)
downloadNetworkManager-669e0b981d2c5f4988a7e298aada3e404cd07e22.tar.gz
shared/nm-glib: add compat implementation for G_SOURCE_FUNC()
G_SOURCE_FUNC() was only added in glib 2.58.
-rw-r--r--shared/nm-glib-aux/nm-glib.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-glib.h b/shared/nm-glib-aux/nm-glib.h
index 8eee05bfc3..fa44f316c8 100644
--- a/shared/nm-glib-aux/nm-glib.h
+++ b/shared/nm-glib-aux/nm-glib.h
@@ -569,4 +569,10 @@ _nm_g_value_unset (GValue *value)
/*****************************************************************************/
+#if !GLIB_CHECK_VERSION (2, 57, 2)
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+#endif
+
+/*****************************************************************************/
+
#endif /* __NM_GLIB_H__ */