summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-12 16:28:19 +0800
committerErik Kundiman <erik@megapahit.org>2023-07-19 12:42:56 +0800
commitcb2595bbb1dfce0170715b7b18c80218e0c20ce9 (patch)
tree69f1ef2df490b8b45a1abb1d6d03cf7486ce9877 /indra
parentb844e48297b6650003aa1f24bef618f7b652466c (diff)
Disable g_thread_init when using system libs
On GCC, compiling against a recent GTK2 version would stop on deprecated pre-processors.
Diffstat (limited to 'indra')
-rw-r--r--indra/llwindow/llwindowsdl.cpp2
-rw-r--r--indra/newview/llappviewerlinux.cpp2
2 files changed, 4 insertions, 0 deletions
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();