aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerThread.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PlayerThread.cxx')
-rw-r--r--src/PlayerThread.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index 2d8e6caaf..ccf16bb39 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -1202,8 +1202,12 @@ player_create(struct player_control *pc)
{
assert(pc->thread == NULL);
+#if GLIB_CHECK_VERSION(2,32,0)
+ pc->thread = g_thread_new("player", player_task, pc);
+#else
GError *e = NULL;
pc->thread = g_thread_create(player_task, pc, true, &e);
if (pc->thread == NULL)
MPD_ERROR("Failed to spawn player task: %s", e->message);
+#endif
}