diff options
author | Art Forz <artforz@localhost> | 2011-10-01 10:15:38 +0200 |
---|---|---|
committer | Art Forz <artforz@localhost> | 2011-10-01 10:15:38 +0200 |
commit | f4fdf27b6c44db4e27e74a6504c4e599ff642b2a (patch) | |
tree | 1051e5f3be6476aa0737f3b73e3c916d776a00e6 | |
parent | 2a05bdd14c6fdeefa337eba56587e7ae996dda33 (diff) |
Hopefully fix jansson compatiblity
-rw-r--r-- | cpu-miner.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu-miner.c b/cpu-miner.c index aa0db61..819d202 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -783,7 +783,11 @@ static void parse_arg (int key, char *arg) json_error_t err; if (opt_config) json_decref(opt_config); +#if JANSSON_VERSION_HEX >= 0x020000 + opt_config = json_load_file(arg, 0, &err); +#else opt_config = json_load_file(arg, &err); +#endif if (!json_is_object(opt_config)) { applog(LOG_ERR, "JSON decode of %s failed", arg); show_usage(); |