{demux_mf,osdep/io}: disable glob usage when it is not available

This currently is only limited to Android. Its stdlib contains the
things that mpv's POSIX check checks for, but unfortunately not
glob().

This fixes Android compilation broken in 70a70b9da .
This commit is contained in:
Jan Ekström 2017-07-25 22:14:06 +03:00
parent 1a0d92aeca
commit 0389852db0
2 changed files with 3 additions and 1 deletions

View File

@ -115,6 +115,7 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct mp_log *log, char *filenam
char *fname = talloc_size(mf, strlen(filename) + 32);
#if HAVE_GLOB
if (!strchr(filename, '%')) {
strcpy(fname, filename);
if (!strchr(filename, '*'))
@ -137,6 +138,7 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct mp_log *log, char *filenam
globfree(&gg);
goto exit_mf;
}
#endif
mp_info(log, "search expr: %s\n", filename);

View File

@ -28,7 +28,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#if HAVE_POSIX
#if HAVE_GLOB_POSIX
#include <glob.h>
#endif