From aa739735146c2d33962ab95c825ee4e7e8b5766b Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 23 Jan 2013 21:15:14 +0100 Subject: [PATCH] Work around glib functions that had been deprecated with glib 2.32. --- indra/llwindow/llwindowsdl.cpp | 4 ++++ .../media_plugins/gstreamer010/media_plugin_gstreamer010.cpp | 3 +++ indra/media_plugins/webkit/media_plugin_webkit.cpp | 4 ++++ indra/newview/llappviewerlinux.cpp | 3 +++ 4 files changed, 14 insertions(+) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 29d2860edf..c3c065e81d 100755 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -121,7 +121,11 @@ bool LLWindowSDL::ll_try_gtk_init(void) if (!tried_gtk_init) { tried_gtk_init = TRUE; + +#if ( !defined(GLIB_MAJOR_VERSION) && !defined(GLIB_MINOR_VERSION) ) || ( GLIB_MAJOR_VERSION < 2 ) || ( GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 32 ) 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/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index c21162ae25..08a5163114 100755 --- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -852,7 +852,10 @@ MediaPluginGStreamer010::startup() // only do global GStreamer initialization once. if (!mDoneInit) { + +#if ( !defined(GLIB_MAJOR_VERSION) && !defined(GLIB_MINOR_VERSION) ) || ( GLIB_MAJOR_VERSION < 2 ) || ( GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 32 ) g_thread_init(NULL); +#endif // Init the glib type system - we need it. g_type_init(); diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 1812abd7d5..2107c11977 100755 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -229,7 +229,11 @@ private: // take care to initialize glib properly, because some // versions of Qt don't, and we indirectly need it for (some // versions of) Flash to not crash the browser. + +#if ( !defined(GLIB_MAJOR_VERSION) && !defined(GLIB_MINOR_VERSION) ) || ( GLIB_MAJOR_VERSION < 2 ) || ( GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 32 ) if (!g_thread_supported ()) g_thread_init (NULL); +#endif + g_type_init(); #endif diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index ff5c44293d..eae25afe06 100755 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -125,7 +125,10 @@ 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! + +#if ( !defined(GLIB_MAJOR_VERSION) && !defined(GLIB_MINOR_VERSION) ) || ( GLIB_MAJOR_VERSION < 2 ) || ( GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 32 ) if (!g_thread_supported ()) g_thread_init (NULL); +#endif return LLAppViewer::init(); }