diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-03 02:39:24 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-01-18 00:46:24 +0100 |
commit | 2047fdb5e741c5e645c0bad2ec43c5eafa8b947f (patch) | |
tree | f5a94674321641b7ef36a9e1618be4fffda0319b /lib/json.h | |
parent | lib: Fix clang SA warnings. (diff) | |
download | frr-2047fdb5e741c5e645c0bad2ec43c5eafa8b947f.tar.xz frr-2047fdb5e741c5e645c0bad2ec43c5eafa8b947f.zip |
lib: Allow json to work across different versions.
The json_object_object_get_ex function is not fully available
across all versions of json. Write a wrapper to allow
it to work.
Ticket: CM-13872
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/json.h')
-rw-r--r-- | lib/json.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/json.h b/lib/json.h index bacc79951..7e9861428 100644 --- a/lib/json.h +++ b/lib/json.h @@ -32,6 +32,10 @@ * so let's just turn it back to the original usage. */ #define json_object_to_json_string_ext(A, B) json_object_to_json_string (A) + +extern int json_object_object_get_ex(struct json_object *obj, + const char *key, + struct json_object **value); #endif #include "command.h" |