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 5aa528b..ffde23d 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 e8036eb..5ea6f09 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"