From c97d05aca29972d8082b825b807c97c429d529bc Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Sun, 10 Mar 2013 17:53:45 +0100 Subject: [PATCH] Add F_GETFL support (which does actually nothing --- src/lib/evil/evil_fcntl.c | 6 +++++- src/lib/evil/evil_fcntl.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c index 7c62c2a..aa68ec1 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 194341b..a545696 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 -- 2.7.4