--- a/flashrom.c.orig +++ b/flashrom.c @@ -1496,7 +1496,7 @@ ret = 1; goto out; } - if ((image_stat.st_size != (__off_t)size) && + if ((image_stat.st_size != (intmax_t)size) && (strncmp(filename, "-", sizeof("-")))) { msg_gerr("Error: Image size (%jd B) doesn't match the flash chip's size (%lu B)!\n", (intmax_t)image_stat.st_size, size);