Glob is not present on all systems.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@370 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-01-05 17:49:45 +00:00
parent 70223bac46
commit 2ce05b2b4b

View file

@ -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;