aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2011-03-20 01:53:13 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2011-03-20 01:53:13 +0000
commit7414bc8cc78c3f0e0bb68794e75d5561adee3cd6 (patch)
treef3ab24b80675888f4c122d4d4e2781359e13d919
parentc93b44bde4c2a5405fe847b9dea65d860fa2bb6c (diff)
downloadpaludis-7414bc8cc78c3f0e0bb68794e75d5561adee3cd6.tar.gz
paludis-7414bc8cc78c3f0e0bb68794e75d5561adee3cd6.tar.xz
Work with Jansson 2.0
-rw-r--r--paludis/repositories/gemcutter/json_things.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/paludis/repositories/gemcutter/json_things.cc b/paludis/repositories/gemcutter/json_things.cc
index e7c1d0d..182f05b 100644
--- a/paludis/repositories/gemcutter/json_things.cc
+++ b/paludis/repositories/gemcutter/json_things.cc
@@ -73,7 +73,11 @@ gemcutter_json_things_parse_all_gems(
Context context("When parsing '" + stringify(path) + "':");
json_error_t error;
+#if JANSSON_MAJOR_VERSION >= 2
+ json_t * root(json_load_file(stringify(path).c_str(), 0, &error));
+#else
json_t * root(json_load_file(stringify(path).c_str(), &error));
+#endif
if (! root)
throw JSONError("Couldn't load '" + stringify(path) + "': jansson said: " + error.text);