Commit 24f1ec9c authored by Thomas Guillem's avatar Thomas Guillem

test: fix test_media_subitems without HAVE_OPENAT

parent 06185e5e
...@@ -198,6 +198,8 @@ static void test_media_subitems(const char** argv, int argc) ...@@ -198,6 +198,8 @@ static void test_media_subitems(const char** argv, int argc)
} }
free (subitems_realpath); free (subitems_realpath);
#ifdef HAVE_OPENAT
/* listing directory via a fd works only if HAVE_OPENAT is defined */
int fd = open (subitems_path, O_RDONLY); int fd = open (subitems_path, O_RDONLY);
log ("Testing media_subitems: fd: '%d'\n", fd); log ("Testing media_subitems: fd: '%d'\n", fd);
assert (fd >= 0); assert (fd >= 0);
...@@ -206,7 +208,9 @@ static void test_media_subitems(const char** argv, int argc) ...@@ -206,7 +208,9 @@ static void test_media_subitems(const char** argv, int argc)
test_media_subitems_media (media, true); test_media_subitems_media (media, true);
libvlc_media_release (media); libvlc_media_release (media);
close (fd); close (fd);
#else
#warning not testing subitems list via a fd location
#endif
libvlc_release (vlc); libvlc_release (vlc);
} }
......
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