When compiling json on systems with json/json.h
that don't have json_object_new_int64, just
use json_object_new_int instead and accept
we might truncate data.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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