diff options
-rw-r--r-- | dtc.c | 2 | ||||
-rw-r--r-- | fstree.c | 2 | ||||
-rw-r--r-- | srcpos.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -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)); @@ -52,7 +52,7 @@ static struct node *read_fstree(const char *dirname) struct property *prop; FILE *pfile; - pfile = fopen(tmpname, "r"); + pfile = fopen(tmpname, "rb"); if (! pfile) { fprintf(stderr, "WARNING: Cannot open %s: %s\n", @@ -77,7 +77,7 @@ static char *try_open(const char *dirname, const char *fname, FILE **fp) else fullname = join_path(dirname, fname); - *fp = fopen(fullname, "r"); + *fp = fopen(fullname, "rb"); if (!*fp) { free(fullname); fullname = NULL; |