imagefile = *argv;
if (lflag) {
- ifd = open(imagefile, O_RDONLY);
+ ifd = open(imagefile, O_RDONLY|O_BINARY);
} else {
ifd = open(imagefile, O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0666);
}
fprintf (stderr, "Adding Image %s\n", datafile);
}
- if ((dfd = open(datafile, O_RDONLY)) < 0) {
+ if ((dfd = open(datafile, O_RDONLY|O_BINARY)) < 0) {
fprintf (stderr, "%s: Can't open %s: %s\n",
cmdname, datafile, strerror(errno));
exit (EXIT_FAILURE);