summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ev.c b/ev.c
index 05c80bf..bfb87f2 100644
--- a/ev.c
+++ b/ev.c
@@ -388,7 +388,11 @@ extern "C" {
# define EFD_NONBLOCK O_NONBLOCK
# endif
# ifndef EFD_CLOEXEC
-# define EFD_CLOEXEC O_CLOEXEC
+# ifdef O_CLOEXEC
+# define EFD_CLOEXEC O_CLOEXEC
+# else
+# define EFD_CLOEXEC 02000000
+# endif
# endif
# ifdef __cplusplus
extern "C" {