mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-04 09:08:30 +00:00
Merge pull request #192 from fjtrujy/fix_directory_iterator
Add F_SETFD cmd to _fcntl function
This commit is contained in:
@@ -443,6 +443,19 @@ int _fcntl(int fd, int cmd, ...)
|
|||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case F_SETFD:
|
||||||
|
{
|
||||||
|
int newfl;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, cmd); /* Initialize the argument list. */
|
||||||
|
newfl = va_arg(args, int);
|
||||||
|
va_end (args); /* Clean up. */
|
||||||
|
|
||||||
|
__descriptormap[fd]->flags = newfl;
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
errno = EBADF;
|
errno = EBADF;
|
||||||
|
Reference in New Issue
Block a user