Commit 6a34476dbd50abf07c86e15a5b4ea4692e6d5169

Con Kolivas 2014-07-17T13:11:08

We only use the jansson in our source tree so no need for special case handling of older versions

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>