summaryrefslogtreecommitdiff
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-4fd1e4364bdd05f42834a3ef8e0624f080263512.tar.gz
rockbox-4fd1e4364bdd05f42834a3ef8e0624f080263512.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 @@
8# 8#
9 9
10#value for crosscompiling on linux 10#value for crosscompiling on linux
11PREFIX=i586-mingw32msvc- 11PREFIX=i686-w64-mingw32-
12 12
13#value for compiling on cygwin 13#value for compiling on cygwin
14#PREFIX= 14#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,
83 /* First, read the iriver original firmware into the image */ 83 /* First, read the iriver original firmware into the image */
84 f = _tfopen(infile, TEXT("rb")); 84 f = _tfopen(infile, TEXT("rb"));
85 if(!f) { 85 if(!f) {
86 perror(infile); 86 _tperror(infile);
87 return 0; 87 return 0;
88 } 88 }
89 89
90 i = fread(image, 1, 16, f); 90 i = fread(image, 1, 16, f);
91 if(i < 16) { 91 if(i < 16) {
92 perror(infile); 92 _tperror(infile);
93 return 0; 93 return 0;
94 } 94 }
95 95
@@ -102,7 +102,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
102 len = binary_length+0x200-16; 102 len = binary_length+0x200-16;
103 i = fread(image+16, 1, len, f); 103 i = fread(image+16, 1, len, f);
104 if(i < len) { 104 if(i < len) {
105 perror(infile); 105 _tperror(infile);
106 return 0; 106 return 0;
107 } 107 }
108 108
@@ -112,7 +112,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
112 112
113 f = _tfopen(outfile, TEXT("wb")); 113 f = _tfopen(outfile, TEXT("wb"));
114 if(!f) { 114 if(!f) {
115 perror(outfile); 115 _tperror(outfile);
116 return 0; 116 return 0;
117 } 117 }
118 118
@@ -164,7 +164,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
164 164
165 i = fwrite(image, 1, total_length, f); 165 i = fwrite(image, 1, total_length, f);
166 if(i < total_length) { 166 if(i < total_length) {
167 perror(outfile); 167 _tperror(outfile);
168 return 0; 168 return 0;
169 } 169 }
170 170