diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-11 03:49:13 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-11 03:49:13 +0000 |
commit | 6a9aae77d4bc6eb644c106fc79be6f59c53c5ba1 (patch) | |
tree | c5df5de86cde147bbb19c087819d6115c113e75d /llvm/lib/Support/MemoryBuffer.cpp | |
parent | 1f7701c19c472ec01a62b2522263ef8118bbc6d5 (diff) | |
download | llvm-6a9aae77d4bc6eb644c106fc79be6f59c53c5ba1.zip llvm-6a9aae77d4bc6eb644c106fc79be6f59c53c5ba1.tar.gz llvm-6a9aae77d4bc6eb644c106fc79be6f59c53c5ba1.tar.bz2 |
There is no posix_category in std, use generic_category.
llvm-svn: 210630
Diffstat (limited to 'llvm/lib/Support/MemoryBuffer.cpp')
-rw-r--r-- | llvm/lib/Support/MemoryBuffer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp index 88d86226..b729809 100644 --- a/llvm/lib/Support/MemoryBuffer.cpp +++ b/llvm/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. |