diff --git a/lib/src/parser.c b/lib/src/parser.c index 7db1aceb..ebeb4b37 100644 --- a/lib/src/parser.c +++ b/lib/src/parser.c @@ -1776,7 +1776,11 @@ void ts_parser_print_dot_graphs(TSParser *self, int fd) { } if (fd >= 0) { + #ifdef _WIN32 + self->dot_graph_file = _fdopen(fd, "a"); + #else self->dot_graph_file = fdopen(fd, "a"); + #endif } else { self->dot_graph_file = NULL; }