service/service.c service/instance.c service/validate.c service/trigger.c service/watch.c
plug/coldplug.c plug/hotplug.c utils/utils.c)
-find_library(json NAMES json-c json)
-SET(LIBS ubox ubus ${json} blobmsg_json json_script)
+SET(LIBS ubox ubus json-c blobmsg_json json_script)
IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -g3)
#include <libubox/blobmsg_json.h>
#include <libubox/json_script.h>
#include <libubox/uloop.h>
-#include <json/json.h>
+#include <json-c/json.h>
#include <fcntl.h>
#include <unistd.h>
#include <libubox/blobmsg_json.h>
#include <libubox/avl-cmp.h>
-#include <json/json.h>
+#include <json-c/json.h>
#include "../procd.h"
if (s && strcmp(s, v->type))
continue;
- o = json_object_object_get(r, v->package);
+ json_object_object_get_ex(r, v->package, &o);
if (!o) {
o = json_object_new_object();
json_object_object_add(r, v->package, o);
}
- t = json_object_object_get(o, v->type);
+ json_object_object_get_ex(o, v->type, &t);
if (!t) {
t = json_object_new_object();
json_object_object_add(o, v->type, t);