]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
utils: add missing header
authorDaniel Wagner <dwagner@suse.de>
Wed, 17 Jul 2024 15:24:32 +0000 (17:24 +0200)
committerDaniel Wagner <wagi@monom.org>
Wed, 17 Jul 2024 15:45:42 +0000 (17:45 +0200)
The build breaks because convert_ts is missing.

Also utils.c depends on json_object_add_value_string, thus define one
when we don't use json-c.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
util/json.h
util/utils.c

index 54e33e397ea416c0007d48b26cf4e1a01522cdb5..3dd5b528691c42a335461b85e1895debe06438f0 100644 (file)
@@ -56,6 +56,8 @@ uint64_t util_json_object_get_uint64(struct json_object *obj);
 
 struct json_object;
 
+#define json_object_add_value_string(o, k, v)
+
 #endif
 
 #endif
index ca9a6bf98d66cdfa459146509afa352514703374..5e3038b945360d89e79a1bbaf36fbb8272622f8d 100644 (file)
@@ -8,6 +8,8 @@
  */
 
 #include "utils.h"
+#include "types.h"
+#include "json.h"
 
 int hex_to_int(char c)
 {