blobmsg_json: include json.h inside blobmsg_json.c instead of the public header file
authorFelix Fietkau <nbd@openwrt.org>
Tue, 23 Sep 2014 10:03:32 +0000 (12:03 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 23 Sep 2014 10:03:32 +0000 (12:03 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blobmsg_json.c
blobmsg_json.h

index 5aa528bc338abbd0e7621931e421349f4e7ebca4..ffde23d33e15d11829bfea631aab3004f377751a 100644 (file)
 #include "blobmsg.h"
 #include "blobmsg_json.h"
 
+#ifdef JSONC
+       #include <json.h>
+#else
+       #include <json/json.h>
+#endif
+
 bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
 {
        json_object_object_foreach(obj, key, val) {
index e8036eb09a737650d932613c02c6adb6d240e0a6..5ea6f09683efa3853389cab4d9360e31cb19b9cf 100644 (file)
 #ifndef __BLOBMSG_JSON_H
 #define __BLOBMSG_JSON_H
 
-#ifdef JSONC
-       #include <json.h>
-#else
-       #include <json/json.h>
-#endif
+struct json_object;
+typedef struct json_object json_object;
 
 #include <stdbool.h>
 #include "blobmsg.h"