summaryrefslogtreecommitdiff
path: root/lib/Support/MemoryBuffer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-11 03:49:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-11 03:49:13 +0000
commit7456ad12403c8bf4bb30cd00ba2d26ad5af19c46 (patch)
tree20e43ca662ae650ab801fb73ff33306f2b194063 /lib/Support/MemoryBuffer.cpp
parent3692045d8e0982a741e7efbb5c72407d29d92b8d (diff)
downloadllvm-7456ad12403c8bf4bb30cd00ba2d26ad5af19c46.tar.gz
llvm-7456ad12403c8bf4bb30cd00ba2d26ad5af19c46.tar.bz2
llvm-7456ad12403c8bf4bb30cd00ba2d26ad5af19c46.tar.xz
There is no posix_category in std, use generic_category.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/MemoryBuffer.cpp')
-rw-r--r--lib/Support/MemoryBuffer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
index 88d862269f..b7298090db 100644
--- a/lib/Support/MemoryBuffer.cpp
+++ b/lib/Support/MemoryBuffer.cpp
@@ -222,7 +222,7 @@ static error_code getMemoryBufferForStream(int FD,
ReadBytes = read(FD, Buffer.end(), ChunkSize);
if (ReadBytes == -1) {
if (errno == EINTR) continue;
- return error_code(errno, posix_category());
+ return error_code(errno, generic_category());
}
Buffer.set_size(Buffer.size() + ReadBytes);
} while (ReadBytes != 0);
@@ -370,7 +370,7 @@ static error_code getOpenFileImpl(int FD, const char *Filename,
size_t BytesLeft = MapSize;
#ifndef HAVE_PREAD
if (lseek(FD, Offset, SEEK_SET) == -1)
- return error_code(errno, posix_category());
+ return error_code(errno, generic_category());
#endif
while (BytesLeft) {
@@ -383,7 +383,7 @@ static error_code getOpenFileImpl(int FD, const char *Filename,
if (errno == EINTR)
continue;
// Error while reading.
- return error_code(errno, posix_category());
+ return error_code(errno, generic_category());
}
if (NumRead == 0) {
memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer.