We only use the jansson in our source tree so no need for special case handling of older versions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/api.c b/api.c
index edd1016..bf539f9 100644
--- a/api.c
+++ b/api.c
@@ -4924,13 +4924,7 @@ void api(int api_thr_id)
param = NULL;
-#if JANSSON_MAJOR_VERSION > 2 || (JANSSON_MAJOR_VERSION == 2 && JANSSON_MINOR_VERSION > 0)
json_config = json_loadb(buf, n, 0, &json_err);
-#elif JANSSON_MAJOR_VERSION > 1
- json_config = json_loads(buf, 0, &json_err);
-#else
- json_config = json_loads(buf, &json_err);
-#endif
if (!json_is_object(json_config)) {
message(io_data, MSG_INVJSON, 0, NULL, isjson);
diff --git a/cgminer.c b/cgminer.c
index 946c438..b71cceb 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1653,11 +1653,7 @@ static char *load_config(const char *arg, void __maybe_unused *unused)
if (++include_count > JSON_MAX_DEPTH)
return JSON_MAX_DEPTH_ERR;
-#if JANSSON_MAJOR_VERSION > 1
config = json_load_file(arg, 0, &err);
-#else
- config = json_load_file(arg, &err);
-#endif
if (!json_is_object(config)) {
siz = JSON_LOAD_ERROR_LEN + strlen(arg) + strlen(err.text);
json_error = malloc(siz);
diff --git a/util.h b/util.h
index 13db85c..40bb5f5 100644
--- a/util.h
+++ b/util.h
@@ -64,11 +64,7 @@
#endif
#endif
-#if JANSSON_MAJOR_VERSION >= 2
#define JSON_LOADS(str, err_ptr) json_loads((str), 0, (err_ptr))
-#else
-#define JSON_LOADS(str, err_ptr) json_loads((str), (err_ptr))
-#endif
#ifdef HAVE_LIBCURL
#include <curl/curl.h>