tests: call g_type_init only if using an old glib

Calling g_type_init() is not needed anymore and deprecated since
glib version 2.36.

https://bugs.freedesktop.org/show_bug.cgi?id=99812
This commit is contained in:
Christian Kellner
2017-02-14 15:09:26 +01:00
committed by Bastien Nocera
parent 8fa3dcd5cd
commit 06ea385260
4 changed files with 10 additions and 0 deletions

View File

@ -159,7 +159,9 @@ int main(int argc, char **argv)
GError *err = NULL;
DBusGProxy *dev;
#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init();
#endif
dbus_g_object_register_marshaller (fprintd_marshal_VOID__STRING_BOOLEAN,
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);