jshn: fix format string for int64 type
authorFelix Fietkau <nbd@nbd.name>
Sat, 7 Apr 2018 08:36:38 +0000 (10:36 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sat, 7 Apr 2018 08:36:38 +0000 (10:36 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
jshn.c

diff --git a/jshn.c b/jshn.c
index 7f67746be559cfea5a10d7c8b81809f20f7d8fdc..24e3265cefc70d44aca71a265e15ffabd030d9e9 100644 (file)
--- a/jshn.c
+++ b/jshn.c
@@ -27,6 +27,7 @@
 #include <getopt.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <inttypes.h>
 #include "list.h"
 
 #include "avl.h"
@@ -156,7 +157,7 @@ static int add_json_element(const char *key, json_object *obj)
                fprintf(stdout, "' %d;\n", json_object_get_boolean(obj));
                break;
        case json_type_int:
-               fprintf(stdout, "' %jd;\n", json_object_get_int64(obj));
+               fprintf(stdout, "' %"PRId64";\n", json_object_get_int64(obj));
                break;
        case json_type_double:
                fprintf(stdout, "' %lf;\n", json_object_get_double(obj));