g_thread_init() is deprecated since Glib 2.23
authorTobias Brunner <tobias@strongswan.org>
Thu, 24 Jan 2013 17:17:27 +0000 (18:17 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 24 Jan 2013 18:13:40 +0000 (19:13 +0100)
src/charon-nm/nm/nm_backend.c
src/libstrongswan/plugins/soup/soup_plugin.c

index f36cf1f..5bb2ed9 100644 (file)
@@ -117,10 +117,13 @@ static bool nm_backend_init()
        nm_backend_t *this;
 
        g_type_init ();
+
+#if !GLIB_CHECK_VERSION(2,23,0)
        if (!g_thread_supported())
        {
                g_thread_init(NULL);
        }
+#endif
 
        INIT(this,
                .creds = nm_creds_create(),
index b21b28b..1260a5a 100644 (file)
@@ -66,10 +66,13 @@ plugin_t *soup_plugin_create()
        private_soup_plugin_t *this;
 
        g_type_init();
+
+#if !GLIB_CHECK_VERSION(2,23,0)
        if (!g_thread_get_initialized())
        {
                g_thread_init(NULL);
        }
+#endif
 
        INIT(this,
                .public = {