Commit 4a800b31 authored by Max Kellermann's avatar Max Kellermann

don't use g_thread_init() with GLib 2.32

Deprecated.
parent a4a13a38
......@@ -387,8 +387,10 @@ int mpd_main(int argc, char *argv[])
g_set_application_name("Music Player Daemon");
#if !GLIB_CHECK_VERSION(2,32,0)
/* enable GLib's thread safety code */
g_thread_init(NULL);
#endif
io_thread_init();
winsock_init();
......
......@@ -88,7 +88,10 @@ main(int argc, char **argv)
/* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(nullptr);
#endif
g_log_set_default_handler(my_log_func, nullptr);
/* initialize MPD */
......
......@@ -153,7 +153,10 @@ int main(int argc, char **argv)
/* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */
......
......@@ -109,7 +109,10 @@ int main(int argc, char **argv)
/* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */
......
......@@ -119,7 +119,9 @@ int main(int argc, G_GNUC_UNUSED char **argv)
return 1;
}
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
main_loop = new EventLoop(EventLoop::Default());
......
......@@ -159,7 +159,10 @@ int main(int argc, char **argv)
decoder_name = argv[1];
path = argv[2];
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
io_thread_init();
if (!io_thread_start(&error)) {
g_warning("%s", error->message);
......
......@@ -156,7 +156,10 @@ int main(int argc, char **argv)
decoder_name = argv[1];
decoder.uri = argv[2];
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL);
io_thread_init();
......
......@@ -109,7 +109,10 @@ int main(int argc, char **argv)
/* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL);
/* read configuration file (mpd.conf) */
......
......@@ -123,7 +123,10 @@ int main(int argc, char **argv)
/* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */
......
......@@ -196,7 +196,9 @@ int main(int argc, char **argv)
audio_format_init(&audio_format, 44100, SAMPLE_FORMAT_S16, 2);
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
/* read configuration file (mpd.conf) */
......
......@@ -66,7 +66,10 @@ main(int argc, char **argv)
/* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment