summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-03-10 17:53:45 +0100
committerCedric BAIL <cedric.bail@samsung.com>2013-03-11 10:34:47 +0900
commitc97d05aca29972d8082b825b807c97c429d529bc (patch)
tree41c95f49584bbc51ef514cc0c2e0fd82f1384396 /src/lib/evil
parent8dedcfae2c2dcc50f8ae707adc17c7a2875c7059 (diff)
downloadefl-c97d05aca29972d8082b825b807c97c429d529bc.tar.gz
Add F_GETFL support (which does actually nothing
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_fcntl.c6
-rw-r--r--src/lib/evil/evil_fcntl.h1
2 files changed, 6 insertions, 1 deletions
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