Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 901cfa7c82..95a08b4128 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -106,6 +106,14 @@ static inline int mingw_mkdir(const char *path, int mode)
}
#define mkdir mingw_mkdir
+static inline int mingw_unlink(const char *pathname)
+{
+ /* read-only files cannot be removed */
+ chmod(pathname, 0666);
+ return unlink(pathname);
+}
+#define unlink mingw_unlink
+
static inline int waitpid(pid_t pid, unsigned *status, unsigned options)
{
if (options == 0)