aboutsummaryrefslogtreecommitdiffstats
path: root/core.lv2/lv2config.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-27 06:06:42 +0000
committerDavid Robillard <d@drobilla.net>2011-03-27 06:06:42 +0000
commitfcd10838f29aba961c8461e1c235f1c7508c373a (patch)
treec681689d2d5762c8bbbc968a369718f2622648f7 /core.lv2/lv2config.c
parent81f7c65c0a300131d2643359aab3943add8b5c77 (diff)
downloadlv2-fcd10838f29aba961c8461e1c235f1c7508c373a.tar.xz
Build lv2config on systems without wordexp.
Diffstat (limited to 'core.lv2/lv2config.c')
-rw-r--r--core.lv2/lv2config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/core.lv2/lv2config.c b/core.lv2/lv2config.c
index 8764f23..51e0df5 100644
--- a/core.lv2/lv2config.c
+++ b/core.lv2/lv2config.c
@@ -34,12 +34,15 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <wordexp.h>
#include "serd-0.1.0.h"
#include "lv2-config.h"
+#ifdef HAVE_WORDEXP
+#include <wordexp.h>
+#endif
+
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define NS_LV2 "http://lv2plug.in/ns/lv2core#"
@@ -168,6 +171,7 @@ discover_manifest(World* world, const char* uri)
static char*
expand(const char* path)
{
+#ifdef HAVE_WORDEXP
char* ret = NULL;
wordexp_t p;
@@ -184,6 +188,9 @@ expand(const char* path)
}
wordfree(&p);
+#else
+ char* ret = strdup(path);
+#endif
return ret;
}