summaryrefslogtreecommitdiff
path: root/libartbase/base/os_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/os_linux.cc')
-rw-r--r--libartbase/base/os_linux.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libartbase/base/os_linux.cc b/libartbase/base/os_linux.cc
index f8b31cf0d8..a00779eb48 100644
--- a/libartbase/base/os_linux.cc
+++ b/libartbase/base/os_linux.cc
@@ -50,7 +50,12 @@ File* OS::CreateEmptyFile(const char* name) {
}
File* OS::CreateEmptyFileWriteOnly(const char* name) {
- return art::CreateEmptyFile(name, O_WRONLY | O_TRUNC | O_NOFOLLOW | O_CLOEXEC);
+#ifdef _WIN32
+ int flags = O_WRONLY | O_TRUNC;
+#else
+ int flags = O_WRONLY | O_TRUNC | O_NOFOLLOW | O_CLOEXEC;
+#endif
+ return art::CreateEmptyFile(name, flags);
}
File* OS::OpenFileWithFlags(const char* name, int flags, bool auto_flush) {