diff options
Diffstat (limited to 'lib/Support/raw_ostream.cpp')
-rw-r--r-- | lib/Support/raw_ostream.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 86cdca1572..0cd9716ac9 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -528,7 +528,8 @@ void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) { } else { // Use ::writev() where available. #if defined(HAVE_WRITEV) - struct iovec IOV = { (void*) Ptr, Size }; + const void *Addr = static_cast<const void *>(Ptr); + struct iovec IOV = {const_cast<void *>(Addr), Size }; ret = ::writev(FD, &IOV, 1); #else ret = ::write(FD, Ptr, Size); |