Commit 83e27117 authored by Travis Gockel's avatar Travis Gockel

kj/io: Make FdOutputStream::write fallback to OutputStream::write.

parent 94946a09
......@@ -322,11 +322,9 @@ void FdOutputStream::write(const void* buffer, size_t size) {
void FdOutputStream::write(ArrayPtr<const ArrayPtr<const byte>> pieces) {
#if _WIN32
// Windows has no reasonable writev(). It has WriteFileGather, but this call has the unreasonable
// restriction that each segment must be page-aligned. So, fall back to write().
// restriction that each segment must be page-aligned. So, fall back to the default implementation
for (auto piece: pieces) {
write(piece.begin(), piece.size());
}
OutputStream::write(pieces);
#else
const size_t iovmax = miniposix::iovMax(pieces.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment