From: Thiago Santos Date: Thu, 24 Nov 2011 17:11:33 +0000 (-0300) Subject: multifile: fix build of tests X-Git-Tag: 1.19.3~509^2~7136^2~241 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3dc5a09a5cedfb1d323fc3c5359ea09046c5122c;p=platform%2Fupstream%2Fgstreamer.git multifile: fix build of tests Tests fail to build because g_mkdtemp is available from glib since 2.26. This patch adds a condition around the redefinition of g_mkdtemp on the tests to only build it if glib is older than 2.26. --- diff --git a/tests/check/elements/multifile.c b/tests/check/elements/multifile.c index 479e028..52ce2ce 100644 --- a/tests/check/elements/multifile.c +++ b/tests/check/elements/multifile.c @@ -40,19 +40,19 @@ run_pipeline (GstElement * pipeline) gst_element_set_state (pipeline, GST_STATE_NULL); } +#if !GLIB_CHECK_VERSION(2,26,0) static gchar * -g_mkdtemp (const gchar * template) +g_mkdtemp (gchar * template) { - gchar *s; gchar *tmpdir; - s = g_strdup (template); - tmpdir = mkdtemp (s); + tmpdir = mkdtemp (template); if (tmpdir == NULL) { - g_free (s); + g_free (template); } return tmpdir; } +#endif GST_START_TEST (test_multifilesink_key_frame) { @@ -93,7 +93,6 @@ GST_START_TEST (test_multifilesink_key_frame) g_free (mfs_pattern); g_free (my_tmpdir); - g_free (template); } GST_END_TEST; @@ -144,7 +143,6 @@ GST_START_TEST (test_multifilesink_max_files) g_free (mfs_pattern); g_free (my_tmpdir); - g_free (template); } GST_END_TEST; @@ -202,7 +200,6 @@ GST_START_TEST (test_multifilesrc) g_free (mfs_pattern); g_free (my_tmpdir); - g_free (template); } GST_END_TEST;