aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Support/MemoryBuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
index 7a60b85..b170ea7 100644
--- a/lib/Support/MemoryBuffer.cpp
+++ b/lib/Support/MemoryBuffer.cpp
@@ -29,6 +29,7 @@
#include <sys/fcntl.h>
#else
#include <io.h>
+#include <fcntl.h>
#endif
using namespace llvm;
@@ -175,7 +176,7 @@ MemoryBuffer *MemoryBuffer::getFile(const char *Filename, std::string *ErrStr,
int64_t FileSize) {
int OpenFlags = 0;
#ifdef O_BINARY
- Flags |= O_BINARY; // Open input file in binary mode on win32.
+ OpenFlags |= O_BINARY; // Open input file in binary mode on win32.
#endif
int FD = ::open(Filename, O_RDONLY|OpenFlags);
if (FD == -1) {