[OpenWrt-Devel] [PATCH] procd: Drop legacy json-c support
William Holland
william.holland at codethink.co.uk
Thu Mar 5 10:12:38 EST 2015
---
CMakeLists.txt | 6 ++++--
plug/hotplug.c | 2 +-
service/validate.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5414677..2ed1a29 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,8 +14,10 @@ SET(SOURCES procd.c signal.c watchdog.c state.c inittab.c rcS.c ubus.c system.c
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)
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(JSONC json-c)
+INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})
+SET(LIBS ubox ubus blobmsg_json json_script)
IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -g3)
diff --git a/plug/hotplug.c b/plug/hotplug.c
index 061833a..6df7971 100644
--- a/plug/hotplug.c
+++ b/plug/hotplug.c
@@ -22,7 +22,7 @@
#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>
diff --git a/service/validate.c b/service/validate.c
index a33a48e..bceddac 100644
--- a/service/validate.c
+++ b/service/validate.c
@@ -13,7 +13,7 @@
#include <libubox/blobmsg_json.h>
#include <libubox/avl-cmp.h>
-#include <json/json.h>
+#include <json-c/json.h>
#include "../procd.h"
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list