Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/common/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,22 @@

#include "murphy/config.h"

#define JSONC_VERSION(maj, min, mic) (((maj) << 16) | ((min) << 8) | (mic))
#define JSONC_013 JSONC_VERSION(0, 13, 0)
#ifndef JSON_INCLUDE_PATH_JSONC
# include <json/json.h>
# include <json/linkhash.h>
/* workaround for older broken json-c not exposing json_object_iter */
# include <json/json_object_private.h>
# if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSONC_013
# include <json/json_object_private.h>
# endif
#else
# include <json-c/json.h>
# include <json-c/linkhash.h>
/* workaround for older broken json-c not exposing json_object_iter */
# include <json-c/json_object_private.h>
# if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSONC_013
# include <json-c/json_object_private.h>
# endif
#endif

#include <murphy/common/macros.h>
Expand Down