summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-10-21 19:49:16 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-10-21 19:49:16 +0000
commitfd8503f557b27c44abee4e7d0c3256d44d82be4c (patch)
tree7bad244143c2c7ae97cb3ad55b3e1c778ec49b81 /lib/json.c
parent39e92c066f210b0b550489e98d3b767ee1553e52 (diff)
parentaac9ef6cb0169ea96debe2872066021608631c16 (diff)
Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: bgpd/bgp_vty.c
Diffstat (limited to 'lib/json.c')
-rw-r--r--lib/json.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/json.c b/lib/json.c
index 966d24f005..3edd146a8f 100644
--- a/lib/json.c
+++ b/lib/json.c
@@ -57,7 +57,11 @@ json_object_int_add(struct json_object* obj, const char *key, int32_t i)
void
json_object_long_add(struct json_object* obj, const char *key, int64_t i)
{
+#if defined(HAVE_JSON_C_JSON_H)
json_object_object_add(obj, key, json_object_new_int64(i));
+#else
+ json_object_object_add(obj, key, json_object_new_int((int)i));
+#endif
}
void