commit: b49fe5088ca8f1fa0191a85e933ec213928449bc
Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Tue Jan 2 16:27:50 2024 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jan 2 16:27:50 2024 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=b49fe508
dumpelf: use explicit 64-bit to display off_t
There's no guarantee that %j (uintmax_t) is large enough to handle off_t.
Signed-off-by: Mike Frysinger <vapier <AT> chromium.org>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
dumpelf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dumpelf.c b/dumpelf.c
index de9a563..1a469ea 100644
--- a/dumpelf.c
+++ b/dumpelf.c
@@ -40,9 +40,9 @@ static void dumpelf(const elfobj *elf, size_t file_cnt)
"\n"
"/*\n"
" * ELF dump of '%s'\n"
- " * %ji (0x%jX) bytes\n"
+ " * %" PRIi64 " (0x%" PRIX64 ") bytes\n"
" */\n\n",
- elf->filename, elf->len, elf->len);
+ elf->filename, (int64_t)elf->len, (uint64_t)elf->len);
/* setup the struct to namespace this elf */
#define MAKE_STRUCT(B) \