libc: opendir should not set errno, it's set by open
This commit is contained in:
parent
8680381ecc
commit
0095f8a2ee
@ -11,7 +11,7 @@ DEFN_SYSCALL3(readdir, SYS_READDIR, int, int, void *);
|
||||
DIR * opendir (const char * dirname) {
|
||||
int fd = open(dirname, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
errno = -fd;
|
||||
/* errno was set by open */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user