Skip to content

Commit

Permalink
Merge pull request markwal#3 from markwal/s3gdumpforwindows
Browse files Browse the repository at this point in the history
Open for read in binary mode on Windows
  • Loading branch information
dcnewman committed Apr 20, 2015
2 parents e68210a + a567d76 commit ff25ba6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/shared/s3g_stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ int s3g_stdio_open(s3g_context_t *ctx, const char *src, int create_file, int mod
{
const char *fname = (const char *)src;
int oflag = create_file ? O_CREAT | O_WRONLY : O_RDONLY;
#ifdef O_BINARY
if (!create_file)
oflag |= O_BINARY;
#endif
int fd = open(fname, oflag, mode);
if (fd < 0)
{
Expand Down

0 comments on commit ff25ba6

Please sign in to comment.