diff options
-rw-r--r-- | shared/nm-glib-aux/nm-glib.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/shared/nm-glib-aux/nm-glib.h b/shared/nm-glib-aux/nm-glib.h index 77a0913899..bdb7ea5b3e 100644 --- a/shared/nm-glib-aux/nm-glib.h +++ b/shared/nm-glib-aux/nm-glib.h @@ -522,10 +522,18 @@ _nm_g_variant_new_printf (const char *format_string, ...) /*****************************************************************************/ -#if !GLIB_CHECK_VERSION (2, 56, 0) +/* Recent glib also casts the results to typeof(Obj), but only if + * + * ( defined(g_has_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 ) + * + * Since we build NetworkManager with older GLIB_VERSION_MAX_ALLOWED, it's + * not taking effect. + * + * Override this. */ +#undef g_object_ref +#undef g_object_ref_sink #define g_object_ref(Obj) ((typeof(Obj)) g_object_ref (Obj)) #define g_object_ref_sink(Obj) ((typeof(Obj)) g_object_ref_sink (Obj)) -#endif /*****************************************************************************/ |