From b2caab7f6078ed46d4bda5103d7f8c93b896a518 Mon Sep 17 00:00:00 2001 From: oprypin Date: Tue, 31 Jan 2017 05:16:13 -0800 Subject: [PATCH] Remove usage of deprecated g_type_init API BUG=webrtc:7024 Review-Url: https://codereview.webrtc.org/2660823003 Cr-Commit-Position: refs/heads/master@{#16376} --- webrtc/examples/peerconnection/client/linux/main.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webrtc/examples/peerconnection/client/linux/main.cc b/webrtc/examples/peerconnection/client/linux/main.cc index 4db929c82e..2982c287f1 100644 --- a/webrtc/examples/peerconnection/client/linux/main.cc +++ b/webrtc/examples/peerconnection/client/linux/main.cc @@ -54,7 +54,11 @@ class CustomSocketServer : public rtc::PhysicalSocketServer { int main(int argc, char* argv[]) { gtk_init(&argc, &argv); - g_type_init(); + // g_type_init API is deprecated (and does nothing) since glib 2.35.0, see: + // https://mail.gnome.org/archives/commits-list/2012-November/msg07809.html +#if !GLIB_CHECK_VERSION(2, 35, 0) + g_type_init(); +#endif // g_thread_init API is deprecated since glib 2.31.0, see release note: // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.html #if !GLIB_CHECK_VERSION(2, 31, 0)