in_lib: use flb_pipe_r() for compatibility with Windows
This line causes a segmentation fault when we try to use Fluent
Bit's library interface on Windows. Fix it.
@@ -58,7 +58,7 @@ static int in_lib_collect(struct flb_input_instance *i_ins,
capacity = LIB_BUF_CHUNK;
}
- bytes = read(ctx->fd,
+ bytes = flb_pipe_r(ctx->fd,
ctx->buf_data + ctx->buf_len,
capacity);
flb_trace("in_lib read() = %i", bytes);
