summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Buren <braewoods+rb@braewoods.net>2020-11-16 21:05:52 +0000
committerJames Buren <braewoods+rb@braewoods.net>2020-11-16 21:05:52 +0000
commit4fd1e4364bdd05f42834a3ef8e0624f080263512 (patch)
tree00abb810a22c663785647ffbe76bfc27e985a95a
parent84086af95730b7fcc976d2242cfa91e1aa40f0f9 (diff)
downloadrockbox-4fd1e4364b.tar.gz
rockbox-4fd1e4364b.tar.bz2
rockbox-4fd1e4364b.zip
fwpatcher: fix compile errors and warnings on modern Linux
Change-Id: I87b71654ce8669904cfb587cb0673a46455bcbd1
-rw-r--r--tools/fwpatcher/Makefile2
-rw-r--r--tools/fwpatcher/main.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/fwpatcher/Makefile b/tools/fwpatcher/Makefile
index a209be183e..e11e6d21ad 100644
--- a/tools/fwpatcher/Makefile
+++ b/tools/fwpatcher/Makefile
@@ -8,7 +8,7 @@
#
#value for crosscompiling on linux
-PREFIX=i586-mingw32msvc-
+PREFIX=i686-w64-mingw32-
#value for compiling on cygwin
#PREFIX=
diff --git a/tools/fwpatcher/main.c b/tools/fwpatcher/main.c
index d6b798637c..5fdac29100 100644
--- a/tools/fwpatcher/main.c
+++ b/tools/fwpatcher/main.c
@@ -83,13 +83,13 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
/* First, read the iriver original firmware into the image */
f = _tfopen(infile, TEXT("rb"));
if(!f) {
- perror(infile);
+ _tperror(infile);
return 0;
}
i = fread(image, 1, 16, f);
if(i < 16) {
- perror(infile);
+ _tperror(infile);
return 0;
}
@@ -102,7 +102,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
len = binary_length+0x200-16;
i = fread(image+16, 1, len, f);
if(i < len) {
- perror(infile);
+ _tperror(infile);
return 0;
}
@@ -112,7 +112,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
f = _tfopen(outfile, TEXT("wb"));
if(!f) {
- perror(outfile);
+ _tperror(outfile);
return 0;
}
@@ -164,7 +164,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
i = fwrite(image, 1, total_length, f);
if(i < total_length) {
- perror(outfile);
+ _tperror(outfile);
return 0;
}