mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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.
This commit is contained in:
parent
b33da78f72
commit
3dc5a09a5c
1 changed files with 5 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue