mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fixed bug in fopen(3) where it didn't open correctly.
This commit is contained in:
parent
ba2cb5103a
commit
17d1b67a77
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ FILE* fopen(const char* path, const char* mode)
|
|||
default: errno = EINVAL; return 0;
|
||||
}
|
||||
}
|
||||
int fd = open(path, fd, 0666);
|
||||
int fd = open(path, omode | oflags, 0666);
|
||||
if ( fd < 0 ) { return NULL; }
|
||||
FILE* fp = fdopen(fd, mode);
|
||||
if ( !fp ) { close(fd); return NULL; }
|
||||
|
|
Loading…
Reference in a new issue