Skip to content

Commit

Permalink
Add O_BINARY to asset.c
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemasterplc authored and rasky committed Oct 13, 2024
1 parent d60b6df commit 923e8f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/asset.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#include <stdalign.h>
#include <sys/stat.h>

#ifndef O_BINARY
#define O_BINARY 0
#endif

#ifdef N64
#include <malloc.h>
#include "debug.h"
Expand Down Expand Up @@ -68,7 +72,7 @@ void __asset_init_compression_lvl3(void)

int must_open(const char *fn)
{
int fd = open(fn, O_RDONLY);
int fd = open(fn, O_RDONLY|O_BINARY);
if (fd < 0) {
// File not found.
int errnum = errno;
Expand Down

0 comments on commit 923e8f3

Please sign in to comment.