Equipped all non-system-dependent open(2) calls with O_BINARY
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -27,6 +27,10 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
/* O_BINARY is needed for Cygwin but undefined elsewhere */
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#include "xorriso.h"
|
||||
#include "xorriso_private.h"
|
||||
@ -64,7 +68,7 @@ int Xorriso_compare_2_contents(struct XorrisO *xorriso, char *common_adr,
|
||||
|
||||
respt= xorriso->result_line;
|
||||
|
||||
fd1= open(disk_adr, O_RDONLY);
|
||||
fd1= open(disk_adr, O_RDONLY | O_BINARY);
|
||||
if(fd1==-1) {
|
||||
sprintf(respt, "- %s (DISK) : cannot open() : %s\n",
|
||||
disk_adr, strerror(errno));
|
||||
|
Reference in New Issue
Block a user