mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 07:33:37 +00:00
winebuild: Open resource files in binary mode.
This commit is contained in:
parent
4008943502
commit
07e835fffb
|
@ -168,7 +168,7 @@ void load_res16_file( const char *name, DLLSPEC *spec )
|
|||
void *base;
|
||||
struct stat st;
|
||||
|
||||
if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
|
||||
if ((fd = open( name, O_RDONLY | O_BINARY )) == -1) fatal_perror( "Cannot open %s", name );
|
||||
if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
|
||||
if (!st.st_size) fatal_error( "%s is an empty file\n", name );
|
||||
#ifdef HAVE_MMAP
|
||||
|
|
|
@ -269,7 +269,7 @@ int load_res32_file( const char *name, DLLSPEC *spec )
|
|||
void *base;
|
||||
struct stat st;
|
||||
|
||||
if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
|
||||
if ((fd = open( name, O_RDONLY | O_BINARY )) == -1) fatal_perror( "Cannot open %s", name );
|
||||
if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
|
||||
if (!st.st_size) fatal_error( "%s is an empty file\n", name );
|
||||
#ifdef HAVE_MMAP
|
||||
|
|
Loading…
Reference in a new issue