diff --git a/package/system/mtd/src/trx.c b/package/system/mtd/src/trx.c index d7c5d832c4..494cc3c91e 100644 --- a/package/system/mtd/src/trx.c +++ b/package/system/mtd/src/trx.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -165,7 +166,7 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size) size_t block_offset; if (quiet < 2) - fprintf(stderr, "Trying to fix trx header in %s at 0x%x...\n", mtd, offset); + fprintf(stderr, "Trying to fix trx header in %s at 0x%zx...\n", mtd, offset); fd = mtd_check_open(mtd); if(fd < 0) { @@ -246,7 +247,7 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size) trx->crc32 = STORE32_LE(crc32buf(buf, data_size)); if (mtd_erase_block(fd, block_offset)) { - fprintf(stderr, "Can't erease block at 0x%x (%s)\n", block_offset, strerror(errno)); + fprintf(stderr, "Can't erease block at 0x%zx (%s)\n", block_offset, strerror(errno)); exit(1); }