diff --git a/blobmsg_json.c b/blobmsg_json.c index 5aa528b..ffde23d 100644 --- a/blobmsg_json.c +++ b/blobmsg_json.c @@ -17,6 +17,12 @@ #include "blobmsg.h" #include "blobmsg_json.h" +#ifdef JSONC + #include +#else + #include +#endif + bool blobmsg_add_object(struct blob_buf *b, json_object *obj) { json_object_object_foreach(obj, key, val) { diff --git a/blobmsg_json.h b/blobmsg_json.h index e8036eb..5ea6f09 100644 --- a/blobmsg_json.h +++ b/blobmsg_json.h @@ -16,11 +16,8 @@ #ifndef __BLOBMSG_JSON_H #define __BLOBMSG_JSON_H -#ifdef JSONC - #include -#else - #include -#endif +struct json_object; +typedef struct json_object json_object; #include #include "blobmsg.h"