summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/PathV2.inc
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
commit20abb2027f8fc15fc72a9695fca53505a59ad691 (patch)
tree4473a16ba63cd3ea1cb0f227b4efc51dbb4edf51 /llvm/lib/Support/Windows/PathV2.inc
parent1ad8dff4bf2e95ced950e7e5dd731684df3d98dd (diff)
downloadbcm5719-llvm-20abb2027f8fc15fc72a9695fca53505a59ad691.tar.gz
bcm5719-llvm-20abb2027f8fc15fc72a9695fca53505a59ad691.zip
[Support][FileSystem] Fix open mode in resize_file on Windows.
llvm-svn: 169166
Diffstat (limited to 'llvm/lib/Support/Windows/PathV2.inc')
-rw-r--r--llvm/lib/Support/Windows/PathV2.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/PathV2.inc b/llvm/lib/Support/Windows/PathV2.inc
index c7ef8278a22..2e6cc96e7f1 100644
--- a/llvm/lib/Support/Windows/PathV2.inc
+++ b/llvm/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
OpenPOWER on IntegriCloud