about summary refs log tree commit diff
path: root/include/nm-glib-compat.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-02-03 14:49:30 +0100
committerMichael Biebl <biebl@debian.org>2013-02-03 14:49:30 +0100
commit02d69323d320e0df4d7daa6115ee1ac1239b1a58 (patch)
treeb83a6b9a01b302117d31476361971212f9fd1750 /include/nm-glib-compat.h
parentd31839fb4152978db9734e24c00fbac4f42debb7 (diff)
parent9c202e3e860b3be9e1f8882630b69affbb130102 (diff)
Merge tag 'upstream/0.9.7.995' into experimental
Upstream version 0.9.7.995
Diffstat (limited to 'include/nm-glib-compat.h')
-rw-r--r--include/nm-glib-compat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/nm-glib-compat.h b/include/nm-glib-compat.h
index f9c1ae49..63d9598d 100644
--- a/include/nm-glib-compat.h
+++ b/include/nm-glib-compat.h
@@ -74,4 +74,13 @@ p##_get_type (void) \
 }
 #endif
 
+#if !GLIB_CHECK_VERSION(2,34,0)
+static inline void
+g_type_ensure (GType type)
+{
+  if (G_UNLIKELY (type == (GType)-1))
+    g_error ("can't happen");
+}
+#endif
+
 #endif  /* NM_GLIB_COMPAT_H */