mingw: ensure temporary file handles are not inherited by child processes
[gitweb.git] / git-compat-util.h
index 49d4029b8dddcb06dc6bea3d5f47c020785e3ddf..f1f98b50d7e3453c66b492e7763f3640198f803f 100644 (file)
@@ -650,6 +650,10 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
 #define getpagesize() sysconf(_SC_PAGESIZE)
 #endif
 
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
+
 #ifdef FREAD_READS_DIRECTORIES
 #ifdef fopen
 #undef fopen