summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-02-04 04:38:42 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-02-04 04:38:42 +0000
commite038e9082cce69f10f17747fc272ae370c9836cf (patch)
tree81738c13224127bddc2f02aa6b62e1281a820354 /flashrom.c
parentf656e8088e95eaa9a4690529597133d0daf66c2a (diff)
downloadast2050-flashrom-e038e9082cce69f10f17747fc272ae370c9836cf.zip
ast2050-flashrom-e038e9082cce69f10f17747fc272ae370c9836cf.tar.gz
Fix building for MacOSX
- Add a new macro named IS_MACOSX to hwaccess.c and use it to enable iopl(). This was broken since r1638. This fix does *not* restore the very permissive concept where iopl() was activated in an #else branch that was inplace before r1638. - Make printing the image file's size in flashrom.c platform independent. Bonus: remove definitions of off64_t and lseek64 which are not necessary anymore for about 1000 commits. Thanks to SJ for reporting the issue and testing the solution. Corresponding to flashrom svn r1648. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/flashrom.c b/flashrom.c
index d89860a..e1be398 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1121,8 +1121,8 @@ int read_buf_from_file(unsigned char *buf, unsigned long size,
return 1;
}
if (image_stat.st_size != size) {
- msg_gerr("Error: Image size (%ld B) doesn't match the flash chip's size (%ld B)!\n",
- image_stat.st_size, size);
+ msg_gerr("Error: Image size (%jd B) doesn't match the flash chip's size (%ld B)!\n",
+ (intmax_t)image_stat.st_size, size);
fclose(image);
return 1;
}
OpenPOWER on IntegriCloud