mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Open binary files in binary mode
The "b" flag to fopen() is generally a no-op on Unix-like systems, but may be important on other systems, including Windows. Signed-off-by: Andrei Errapart <andrei@errapartengineering.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
25a9bd6267
commit
83e606a64d
3 changed files with 3 additions and 3 deletions
2
dtc.c
2
dtc.c
|
@ -237,7 +237,7 @@ int main(int argc, char *argv[])
|
|||
if (streq(outname, "-")) {
|
||||
outf = stdout;
|
||||
} else {
|
||||
outf = fopen(outname, "w");
|
||||
outf = fopen(outname, "wb");
|
||||
if (! outf)
|
||||
die("Couldn't open output file %s: %s\n",
|
||||
outname, strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue