Commit 3dc5a09a authored by Thiago Santos's avatar Thiago Santos
Browse files

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.
parent b33da78f
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment