From 07e835fffb202ff5b60f594c9a00069297295065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Wed, 24 Jun 2009 21:10:55 +0200 Subject: [PATCH] winebuild: Open resource files in binary mode. --- tools/winebuild/res16.c | 2 +- tools/winebuild/res32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/winebuild/res16.c b/tools/winebuild/res16.c index a957ca857fa..8a26ae27906 100644 --- a/tools/winebuild/res16.c +++ b/tools/winebuild/res16.c @@ -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 diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c index 0aaf2f0f51a..946523d937f 100644 --- a/tools/winebuild/res32.c +++ b/tools/winebuild/res32.c @@ -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