Make it compile using inttypes.h
authorSofian Brabez <sbz@FreeBSD.org>
Sat, 12 Nov 2016 05:20:52 +0000 (06:20 +0100)
committerSofian Brabez <sbz@FreeBSD.org>
Mon, 16 Oct 2017 16:09:51 +0000 (18:09 +0200)
ctfdump.c
elf.c

index 34571329aa9d87d1b7e5f105e924eb7e26e22d6f..26cd05b7a4920dcacf283f4a42d33374187786ed 100644 (file)
--- a/ctfdump.c
+++ b/ctfdump.c
@@ -459,7 +459,7 @@ ctf_dump_type(struct ctf_header *cth, const char *data, off_t dlen,
                break;
        case CTF_K_STRUCT:
        case CTF_K_UNION:
-               printf(" (%llu bytes)\n", size);
+               printf(" (%"PRIu64" bytes)\n", size);
 
                if (size < CTF_LSTRUCT_THRESH) {
                        for (i = 0; i < vlen; i++) {
@@ -480,7 +480,7 @@ ctf_dump_type(struct ctf_header *cth, const char *data, off_t dlen,
                                ctlm = (struct ctf_lmember *)(p + toff);
                                toff += sizeof(struct ctf_lmember);
 
-                               printf("\t%s type=%u off=%llu\n",
+                               printf("\t%s type=%u off=%"PRIu64"\n",
                                    ctf_off2name(cth, data, dlen,
                                        ctlm->ctlm_name),
                                    ctlm->ctlm_type, CTF_LMEM_OFFSET(ctlm));
@@ -605,7 +605,7 @@ decompress(const char *buf, size_t size, off_t len)
        }
 
        if (stream.total_out != len) {
-               warnx("decompression failed: %llu != %llu",
+               warnx("decompression failed: %"PRIu64" != %"PRIu64" ",
                    stream.total_out, len);
                goto exit;
        }
diff --git a/elf.c b/elf.c
index cdc49e04232d0d9ed19666c84358b4cfad9a7b7e..985c83051093351321c039249db49ae012849f9a 100644 (file)
--- a/elf.c
+++ b/elf.c
@@ -45,7 +45,7 @@ iself(const char *p, size_t filesize)
                return 0;
        }
        if (eh->e_shoff > filesize) {
-               warnx("bogus section table offset 0x%llx", (off_t)eh->e_shoff);
+               warnx("bogus section table offset 0x%"PRIx64"", (off_t)eh->e_shoff);
                return 0;
        }
        if (eh->e_shentsize < sizeof(Elf_Shdr)) {