#include <endian.h>
#include <string.h>
#include <errno.h>
+#include <netinet/in.h>
#include <sys/ioctl.h>
#include <mtd/mtd-user.h>
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) {
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);
}