summaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2012-12-03 22:09:31 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2012-12-03 22:09:31 +0000
commit604db310f0d1bbb612ed4c792979c6d3aecdbc1c (patch)
tree59bc398e5129f027bd8055d57423c8723ec27b58 /lib/Support
parent2b8150318d66f21cd6ac36b2813165af833565a5 (diff)
downloadexternal_llvm-604db310f0d1bbb612ed4c792979c6d3aecdbc1c.zip
external_llvm-604db310f0d1bbb612ed4c792979c6d3aecdbc1c.tar.gz
external_llvm-604db310f0d1bbb612ed4c792979c6d3aecdbc1c.tar.bz2
[Support][FileSystem] Fix open mode in resize_file on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Windows/PathV2.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Windows/PathV2.inc b/lib/Support/Windows/PathV2.inc
index c7ef827..2e6cc96 100644
--- a/lib/Support/Windows/PathV2.inc
+++ b/lib/Support/Windows/PathV2.inc
@@ -328,7 +328,7 @@ error_code resize_file(const Twine &path, uint64_t size) {
path_utf16))
return ec;
- int fd = ::_wopen(path_utf16.begin(), O_BINARY, S_IREAD | S_IWRITE);
+ int fd = ::_wopen(path_utf16.begin(), O_BINARY | _O_RDWR, S_IWRITE);
if (fd == -1)
return error_code(errno, generic_category());
#ifdef HAVE__CHSIZE_S