diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-03 07:59:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-03 07:59:55 +0000 |
commit | 4db51231d9338c31a1182fcb225e9fd7f57db258 (patch) | |
tree | f83fa4e90727c4891001f956f02cf5a9500f6c05 /util/json.h | |
parent | Releasing debian version 2.3-2. (diff) | |
download | nvme-cli-4db51231d9338c31a1182fcb225e9fd7f57db258.tar.xz nvme-cli-4db51231d9338c31a1182fcb225e9fd7f57db258.zip |
Merging upstream version 2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'util/json.h')
-rw-r--r-- | util/json.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/util/json.h b/util/json.h index 1312cb8..c362408 100644 --- a/util/json.h +++ b/util/json.h @@ -2,6 +2,7 @@ #ifndef __JSON__H #define __JSON__H +#ifdef CONFIG_JSONC #include <json.h> #include "util/types.h" @@ -12,7 +13,7 @@ #define json_free_object(o) json_object_put(o) #define json_free_array(a) json_object_put(a) #define json_object_add_value_uint(o, k, v) \ - json_object_object_add(o, k, json_object_new_int(v)) + json_object_object_add(o, k, json_object_new_uint64(v)) #define json_object_add_value_int(o, k, v) \ json_object_object_add(o, k, json_object_new_int(v)) #ifndef CONFIG_JSONC_14 @@ -48,4 +49,11 @@ struct json_object *util_json_object_new_uint128(nvme_uint128_t val); struct json_object *util_json_object_new_uint128(nvme_uint128_t val); uint64_t util_json_object_get_uint64(struct json_object *obj); + +#else /* !CONFIG_JSONC */ + +struct json_object; + +#endif + #endif |