main: 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:10:14 +01:00
committed by Bastien Nocera
parent 06ea385260
commit 3d2d73d615

View File

@ -300,7 +300,10 @@ int main(int argc, char **argv)
context = g_option_context_new ("Fingerprint handler daemon");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init();
#endif
if (g_option_context_parse (context, &argc, &argv, &error) == FALSE) {
g_print ("couldn't parse command-line options: %s\n", error->message);