fwpatcher: fix compile errors and warnings on modern Linux
Change-Id: I87b71654ce8669904cfb587cb0673a46455bcbd1
This commit is contained in:
parent
84086af957
commit
4fd1e4364b
2 changed files with 6 additions and 6 deletions
|
@ -8,7 +8,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
#value for crosscompiling on linux
|
#value for crosscompiling on linux
|
||||||
PREFIX=i586-mingw32msvc-
|
PREFIX=i686-w64-mingw32-
|
||||||
|
|
||||||
#value for compiling on cygwin
|
#value for compiling on cygwin
|
||||||
#PREFIX=
|
#PREFIX=
|
||||||
|
|
|
@ -83,13 +83,13 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
|
||||||
/* First, read the iriver original firmware into the image */
|
/* First, read the iriver original firmware into the image */
|
||||||
f = _tfopen(infile, TEXT("rb"));
|
f = _tfopen(infile, TEXT("rb"));
|
||||||
if(!f) {
|
if(!f) {
|
||||||
perror(infile);
|
_tperror(infile);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = fread(image, 1, 16, f);
|
i = fread(image, 1, 16, f);
|
||||||
if(i < 16) {
|
if(i < 16) {
|
||||||
perror(infile);
|
_tperror(infile);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
|
||||||
len = binary_length+0x200-16;
|
len = binary_length+0x200-16;
|
||||||
i = fread(image+16, 1, len, f);
|
i = fread(image+16, 1, len, f);
|
||||||
if(i < len) {
|
if(i < len) {
|
||||||
perror(infile);
|
_tperror(infile);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
|
||||||
|
|
||||||
f = _tfopen(outfile, TEXT("wb"));
|
f = _tfopen(outfile, TEXT("wb"));
|
||||||
if(!f) {
|
if(!f) {
|
||||||
perror(outfile);
|
_tperror(outfile);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ int mkboot(TCHAR *infile, TCHAR *outfile, unsigned char *bldata, int bllen,
|
||||||
|
|
||||||
i = fwrite(image, 1, total_length, f);
|
i = fwrite(image, 1, total_length, f);
|
||||||
if(i < total_length) {
|
if(i < total_length) {
|
||||||
perror(outfile);
|
_tperror(outfile);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue