summaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
Diffstat (limited to 'trace')
-rw-r--r--trace/simple.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/trace/simple.c b/trace/simple.c
index 6339152d27..bbc99302b9 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -376,7 +376,12 @@ bool trace_backend_init(const char *events, const char *file)
GThread *thread;
if (!g_thread_supported()) {
+#if !GLIB_CHECK_VERSION(2, 31, 0)
g_thread_init(NULL);
+#else
+ fprintf(stderr, "glib threading failed to initialize.\n");
+ exit(1);
+#endif
}
trace_available_cond = g_cond_new();