summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-01-18 17:02:30 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2017-01-18 17:02:30 +0100
commit11c1607038889c7b25350f67f1f6c2a822d06c2f (patch)
tree7ddf256adaf0cac5553f0feb7f75a224698b0a2d /lib/json.c
parenteb3d20d3980db85025ede6cfad14c3e6b77629a4 (diff)
parentf909c673937f94086978c1e89ce1663c1b074508 (diff)
Merge pull request 'frr/pull/85'
Library changes and some zebra (Linux) kernel interface foo from the PIM-SM/MSDP changeset. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/json.c')
-rw-r--r--lib/json.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/json.c b/lib/json.c
index 3edd146a8f..ccbecb726a 100644
--- a/lib/json.c
+++ b/lib/json.c
@@ -87,3 +87,18 @@ json_object_free(struct json_object *obj)
{
json_object_put(obj);
}
+
+#if !defined(HAVE_JSON_C_JSON_H)
+int
+json_object_object_get_ex(struct json_object *obj,
+ const char *key,
+ struct json_object **value)
+{
+ *value = json_object_object_get(obj, key);
+
+ if (*value)
+ return 1;
+
+ return 0;
+}
+#endif