summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-12-14 09:51:58 (GMT)
committerXavier Claessens <xclaesse@gmail.com>2011-12-14 09:51:58 (GMT)
commit85556079abd82cc6d86a395e5b3e9e35da1482a8 (patch)
tree0d27c6e071c75f8f0db84f74a669a84cf505c7bd
parentd1ebf26eb23a307d8e45f7b49770481151c0ab26 (diff)
downloadwocky-85556079abd82cc6d86a395e5b3e9e35da1482a8.tar.gz
wocky-85556079abd82cc6d86a395e5b3e9e35da1482a8.tar.xz
Fix build warnings with glib 2.32
-rw-r--r--tests/wocky-http-proxy-test.c4
-rw-r--r--tests/wocky-sasl-utils-test.c4
-rw-r--r--tests/wocky-test-helper.c3
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/wocky-http-proxy-test.c b/tests/wocky-http-proxy-test.c
index ebe711c..9567401 100644
--- a/tests/wocky-http-proxy-test.c
+++ b/tests/wocky-http-proxy-test.c
@@ -101,7 +101,11 @@ static void
run_in_thread (HttpTestData *data,
GThreadFunc func)
{
+#if GLIB_CHECK_VERSION (2, 31, 0)
+ data->thread = g_thread_new ("server_thread", func, data);
+#else
data->thread = g_thread_create (func, data, TRUE, NULL);
+#endif
g_assert (data->thread != NULL);
}
diff --git a/tests/wocky-sasl-utils-test.c b/tests/wocky-sasl-utils-test.c
index 1b0d359..98a1d08 100644
--- a/tests/wocky-sasl-utils-test.c
+++ b/tests/wocky-sasl-utils-test.c
@@ -146,7 +146,11 @@ main (int argc,
char **argv)
{
int i;
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
g_thread_init (NULL);
+#endif
+
g_test_init (&argc, &argv, NULL);
for (i = 0 ; hmac_sha1_tests[i].key_len > 0 ; i++)
diff --git a/tests/wocky-test-helper.c b/tests/wocky-test-helper.c
index 3bf7496..665afeb 100644
--- a/tests/wocky-test-helper.c
+++ b/tests/wocky-test-helper.c
@@ -288,7 +288,10 @@ void
test_init (int argc,
char **argv)
{
+#if !GLIB_CHECK_VERSION (2, 31, 0)
g_thread_init (NULL);
+#endif
+
g_test_init (&argc, &argv, NULL);
g_type_init ();
wocky_init ();