From 7414bc8cc78c3f0e0bb68794e75d5561adee3cd6 Mon Sep 17 00:00:00 2001 From: David Leverton Date: Sun, 20 Mar 2011 01:53:13 +0000 Subject: Work with Jansson 2.0 --- paludis/repositories/gemcutter/json_things.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paludis/repositories/gemcutter/json_things.cc b/paludis/repositories/gemcutter/json_things.cc index e7c1d0db1..182f05b77 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); -- cgit v1.2.3