From cb2595bbb1dfce0170715b7b18c80218e0c20ce9 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 12 Jul 2023 16:28:19 +0800 Subject: Disable g_thread_init when using system libs On GCC, compiling against a recent GTK2 version would stop on deprecated pre-processors. --- indra/llwindow/llwindowsdl.cpp | 2 ++ indra/newview/llappviewerlinux.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index d9f7d07326..8384845516 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -119,7 +119,9 @@ bool LLWindowSDL::ll_try_gtk_init(void) if (!tried_gtk_init) { tried_gtk_init = TRUE; +#ifndef LL_USESYSTEMLIBS if (!g_thread_supported ()) g_thread_init (NULL); +#endif maybe_lock_display(); gtk_is_good = gtk_init_check(NULL, NULL); maybe_unlock_display(); diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 9f58f90326..a110828967 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -120,7 +120,9 @@ bool LLAppViewerLinux::init() // before any mutexes are held, *and* some of our third-party // libraries likes to use glib functions; in short, do this here // really early in app startup! +#ifndef LL_USESYSTEMLIBS if (!g_thread_supported ()) g_thread_init (NULL); +#endif bool success = LLAppViewer::init(); -- cgit v1.2.3