summaryrefslogtreecommitdiff
path: root/src/posix.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-04-05 09:50:12 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2017-04-05 11:04:29 +0100
commit89d403cce27eca2ee58d2d5fe7b1bf64b59eaf3c (patch)
tree1eb5f2511f260c4ec4fba0b264ac2393275a1431 /src/posix.h
parent7ece906598fff75ea0d0b73b7158c077e6654698 (diff)
downloadlibgit2-89d403cce27eca2ee58d2d5fe7b1bf64b59eaf3c.tar.gz
win32: enable `p_utimes` for readonly files
Instead of failing to set the timestamp of a read-only file (like any object file), set it writable temporarily to update the timestamp.
Diffstat (limited to 'src/posix.h')
-rw-r--r--src/posix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/posix.h b/src/posix.h
index bd5a98e26..d26371bca 100644
--- a/src/posix.h
+++ b/src/posix.h
@@ -24,6 +24,10 @@
#define _S_IFLNK S_IFLNK
#endif
+#ifndef S_IWUSR
+#define S_IWUSR 00200
+#endif
+
#ifndef S_IXUSR
#define S_IXUSR 00100
#endif