diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h index f4eb01e930..ce5783c9c1 100644 --- a/windows/mpconfigport.h +++ b/windows/mpconfigport.h @@ -134,7 +134,8 @@ typedef long mp_off_t; typedef void *machine_ptr_t; // must be of pointer size typedef const void *machine_const_ptr_t; // must be of pointer size -#define MP_PLAT_PRINT_STRN(str, len) fwrite(str, 1, len, stdout) +#include +#define MP_PLAT_PRINT_STRN(str, len) do { int ret = write(1, str, len); (void)ret; } while (0) extern const struct _mp_obj_fun_builtin_t mp_builtin_input_obj; extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;