diff --git a/polyp/scache.c b/polyp/scache.c index 54563badb..0dec33cef 100644 --- a/polyp/scache.c +++ b/polyp/scache.c @@ -32,7 +32,10 @@ #include #include #include + +#ifdef HAVE_GLOB_H #include +#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;