mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-14 06:59:53 -05:00
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:
parent
70223bac46
commit
2ce05b2b4b
1 changed files with 7 additions and 0 deletions
|
|
@ -32,7 +32,10 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_GLOB_H
|
||||||
#include <glob.h>
|
#include <glob.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "scache.h"
|
#include "scache.h"
|
||||||
#include "sink-input.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 */
|
/* First try to open this as directory */
|
||||||
if (!(dir = opendir(pathname))) {
|
if (!(dir = opendir(pathname))) {
|
||||||
|
#ifdef HAVE_GLOB_H
|
||||||
glob_t p;
|
glob_t p;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
/* If that fails, try to open it as shell glob */
|
/* 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]);
|
add_file(c, p.gl_pathv[i]);
|
||||||
|
|
||||||
globfree(&p);
|
globfree(&p);
|
||||||
|
#else
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
struct dirent *e;
|
struct dirent *e;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue