p2v: Call g_thread_init with old glib2 as used by RHEL 6.

This commit is contained in:
Richard W.M. Jones
2015-08-13 08:40:29 -04:00
parent 00bceec421
commit 2bfb9ff9ea

View File

@@ -118,6 +118,13 @@ main (int argc, char *argv[])
bindtextdomain (PACKAGE, LOCALEBASEDIR);
textdomain (PACKAGE);
#if ! GLIB_CHECK_VERSION(2,32,0)
/* In glib2 < 2.32 you had to call g_thread_init(). In later glib2
* that is not required and should not be called.
*/
if (glib_check_version (2, 32, 0) != NULL) /* This checks < 2.32 */
g_thread_init (NULL);
#endif
gdk_threads_init ();
gdk_threads_enter ();
gui_possible = gtk_init_check (&argc, &argv);