From 9c202e3e860b3be9e1f8882630b69affbb130102 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 3 Feb 2013 14:49:22 +0100 Subject: Imported Upstream version 0.9.7.995 --- include/nm-glib-compat.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/nm-glib-compat.h') 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 */ -- cgit 1.3.0-6-gf8a5