diff --git a/src/exec.cpp b/src/exec.cpp index b3cf72e55..0cf44605c 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -445,7 +445,9 @@ static std::unique_ptr create_output_stream_for_builtin( // Our IO redirection is to an internal buffer, e.g. a command substitution. // We will write directly to it. std::shared_ptr buffer = - dynamic_cast(io.get())->buffer(); + // (this is not a dynamic_cast because that needs rtti, + // and we currently use it nowhere else) + ((const io_bufferfill_t *)io.get())->buffer(); return make_unique(buffer); }