summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-09-16 07:26:54 -0300
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-09-16 07:26:54 -0300
commit6e12d4f86cd3925fe8737f0ae5f09240b4d274d3 (patch)
tree048d65706434c70eeacc84fa20835ec622fec647
parent60f84b733abd1f77d0f8c89f8b3af0ec72dd0720 (diff)
downloadefl-6e12d4f86cd3925fe8737f0ae5f09240b4d274d3.tar.gz
efl_io_file: unbreak windows build (missing O_CLOEXEC).
To avoid many ifdef, define the flag to 0 so we "| 0" or "& ~0", that have no effect. Fixes T4612.
-rw-r--r--src/lib/ecore/efl_io_file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ecore/efl_io_file.c b/src/lib/ecore/efl_io_file.c
index a5ec38f3b0..f6588bb1cc 100644
--- a/src/lib/ecore/efl_io_file.c
+++ b/src/lib/ecore/efl_io_file.c
@@ -16,6 +16,15 @@
#include <sys/stat.h>
#include <fcntl.h>
+#ifndef O_CLOEXEC
+/* If a platform doesn't define O_CLOEXEC, then use 0 as we'll "| 0"
+ * and "& ~0", which have no effect.
+ *
+ * This should be the case on _WIN32.
+ */
+#define O_CLOEXEC (0)
+#endif
+
#define MY_CLASS EFL_IO_FILE_CLASS
typedef struct _Efl_Io_File_Data