summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-05 17:49:45 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-05 17:49:45 +0000
commit2ce05b2b4bda7933b419495e715c41909c3adf7e (patch)
treedffade149d0c55f904e1ba66fb1533e713cb16e4
parent70223bac46f53f89041db61d2a06ea772968ce2d (diff)
Glob is not present on all systems.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@370 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--polyp/scache.c7
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;