diff --git a/wmud/game.c b/wmud/game.c index f1908ae..c41a45f 100644 --- a/wmud/game.c +++ b/wmud/game.c @@ -116,7 +116,11 @@ wmud_game_init(GThread **game_thread, GMainContext **game_context) g_source_unref(timeout_source); g_clear_error(&err); +#if GLIB_CHECK_VERSION(2,32,0) + *game_thread = g_thread_new("game", (GThreadFunc)game_thread_func, game_loop); +#else *game_thread = g_thread_create((GThreadFunc)game_thread_func, game_loop, TRUE, &err); +#endif return TRUE; } diff --git a/wmud/maintenance.c b/wmud/maintenance.c index b715faa..678d27a 100644 --- a/wmud/maintenance.c +++ b/wmud/maintenance.c @@ -204,6 +204,10 @@ wmud_maintenance_init(void) g_source_attach(timeout_source, maint_context); g_source_unref(timeout_source); +#if GLIB_CHECK_VERSION(2,32,0) g_thread_new("maintenance", (GThreadFunc)maint_thread_func, maint_loop); +#else + g_thread_create((GThreadFunc)maint_thread_func, maint_loop, TRUE, NULL); +#endif }