summaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-06-08 14:35:16 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2017-06-08 14:35:16 +1000
commit13ce6e1c2fc4549fbb53a9ca5f577166c6e315ac (patch)
treed1cde9622f5a8c2c7d8f0df784b05c9b275b7642 /dtc.h
parentd990b8013889b816ec054c7e07a77db59c56c400 (diff)
downloaddevice-tree-compiler-13ce6e1c2fc4549fbb53a9ca5f577166c6e315ac.tar.gz
dtc: fix sprintf() format string error, again
2a42b14 "dtc: check.c fix compile error" changed a format string using %lx which wasn't correct for all platforms. Unfortunately it changed it to %zx, which is wrong for a different set of platforms (and only right on the others by accident). The parameter we're formatting here is uint64_t, not size_t, so we need to use the PRIx64 macro from <inttypes.h> to get this right. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/dtc.h b/dtc.h
index fc24e17..409db76 100644
--- a/dtc.h
+++ b/dtc.h
@@ -31,6 +31,7 @@
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
+#include <inttypes.h>
#include <libfdt_env.h>
#include <fdt.h>