summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-04-14 10:53:31 +0200
committerDavid Robillard <d@drobilla.net>2019-04-14 11:18:00 +0200
commit3b8a3bf458e920c1cff533db72e17ecc7b09c36d (patch)
tree428c940c0fe9b80009c9df0807f2049435952a19
parent41a1a23f81ca279a0d8baf0c85ab97db9e267f9a (diff)
downloadlilv-3b8a3bf458e920c1cff533db72e17ecc7b09c36d.tar.gz
lilv-3b8a3bf458e920c1cff533db72e17ecc7b09c36d.tar.bz2
lilv-3b8a3bf458e920c1cff533db72e17ecc7b09c36d.zip
Fix test bundle URI on Windows
-rw-r--r--lilv/lilv.h3
-rw-r--r--test/lilv_test.c10
2 files changed, 10 insertions, 3 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h
index 6ce93d0..58d00dc 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -46,7 +46,8 @@
#else
# define LILV_API
#endif
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#if defined(__GNUC__) && (__GNUC__ > 3 || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
# define LILV_DEPRECATED __attribute__((__deprecated__))
#else
# define LILV_DEPRECATED
diff --git a/test/lilv_test.c b/test/lilv_test.c
index f694742..ca56819 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -87,13 +87,19 @@ init_tests(void)
"%s/test_lv2_path/lilv-test.lv2", build_path);
lilv_mkdir_p(test_bundle_path);
- snprintf(test_bundle_uri, sizeof(test_bundle_uri), "file://%s/",
- test_bundle_path);
+ SerdNode s = serd_node_new_file_uri(
+ (const uint8_t*)test_bundle_path, NULL, NULL, true);
+
+ snprintf(test_bundle_uri, sizeof(test_bundle_uri), "%s/",
+ (const char*)s.buf);
snprintf(test_manifest_path, sizeof(test_manifest_path), "%s/manifest.ttl",
test_bundle_path);
snprintf(test_content_path, sizeof(test_content_path), "%s/plugin.ttl",
test_bundle_path);
+ serd_node_free(&s);
+ lilv_free(build_path);
+
delete_bundle();
}