diff options
Diffstat (limited to 'polyp/scache.c')
-rw-r--r-- | polyp/scache.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/polyp/scache.c b/polyp/scache.c index 54563bad..0dec33ce 100644 --- a/polyp/scache.c +++ b/polyp/scache.c @@ -32,7 +32,10 @@ #include <sys/stat.h> #include <errno.h> #include <limits.h> + +#ifdef HAVE_GLOB_H #include <glob.h> +#endif #include "scache.h" #include "sink-input.h" @@ -320,6 +323,7 @@ int pa_scache_add_directory_lazy(struct pa_core *c, const char *pathname) { /* First try to open this as directory */ if (!(dir = opendir(pathname))) { +#ifdef HAVE_GLOB_H glob_t p; unsigned int i; /* If that fails, try to open it as shell glob */ @@ -333,6 +337,9 @@ int pa_scache_add_directory_lazy(struct pa_core *c, const char *pathname) { add_file(c, p.gl_pathv[i]); globfree(&p); +#else + return -1; +#endif } else { struct dirent *e; |