diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c index 7c62c2a310..aa68ec1abf 100644 --- a/src/lib/evil/evil_fcntl.c +++ b/src/lib/evil/evil_fcntl.c @@ -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; diff --git a/src/lib/evil/evil_fcntl.h b/src/lib/evil/evil_fcntl.h index 194341b369..a54569681f 100644 --- a/src/lib/evil/evil_fcntl.h +++ b/src/lib/evil/evil_fcntl.h @@ -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