]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
util/json: fix build error of json_object_add_value_uint64 #1260
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Thu, 9 Dec 2021 11:34:24 +0000 (20:34 +0900)
committerSteven Seungcheol Lee <sc108.lee@samsung.com>
Thu, 9 Dec 2021 13:22:00 +0000 (22:22 +0900)
util/json used when system does not have json-c library
json_object_add_value_uint handled with unsigned long long (64bits)
That's why json_object_add_value_uint64 is redefined with it

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
util/json.h

index 666c78d1d1b398a7e83e2fa3c81931cb549a0098..2ef863220aff2beb1de3cfd3f4c617e34c600287 100644 (file)
@@ -54,6 +54,7 @@ int json_object_add_value_type(struct json_object *obj, const char *name, int ty
        json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (long long) (val))
 #define json_object_add_value_uint(obj, name, val) \
        json_object_add_value_type((obj), name, JSON_TYPE_UINT, (unsigned long long) (val))
+#define json_object_add_value_uint64 json_object_add_value_uint
 #define json_object_add_value_float(obj, name, val) \
        json_object_add_value_type((obj), name, JSON_TYPE_FLOAT, (val))
 #define json_object_add_value_string(obj, name, val) \