Add F_GETFL support (which does actually nothing

This commit is contained in:
Cedric Bail 2013-03-10 17:53:45 +01:00 committed by Cedric BAIL
parent 8dedcfae2c
commit c97d05aca2
2 changed files with 6 additions and 1 deletions

View File

@ -62,12 +62,16 @@ int fcntl(int fd, int cmd, ...)
#endif /* ! __MINGW32CE__ */
}
}
else if (cmd == F_GETFL)
{
/* does nothing*/
}
else if (cmd == F_SETFL)
{
long flag;
flag = va_arg(va, long);
if (flag == O_NONBLOCK)
if (flag & O_NONBLOCK)
{
u_long arg = 1;
int type;

View File

@ -39,6 +39,7 @@
# define F_GETFD 1
# define F_SETFD 2
# define F_GETFL 3
# define F_SETFL 4
# define F_SETLK 6
# define F_SETLKW 7