mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
p2v: Call g_thread_init with old glib2 as used by RHEL 6.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user