summaryrefslogtreecommitdiffstatshomepage
path: root/unix/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/file.c')
-rw-r--r--unix/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/file.c b/unix/file.c
index 7f1b285a5d..a2706a96c5 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -36,6 +36,8 @@
#include "py/stream.h"
#include "py/builtin.h"
+#if MICROPY_PY_IO
+
#ifdef _WIN32
#define fsync _commit
#endif
@@ -264,3 +266,5 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open);
const mp_obj_fdfile_t mp_sys_stdin_obj = { .base = {&mp_type_textio}, .fd = STDIN_FILENO };
const mp_obj_fdfile_t mp_sys_stdout_obj = { .base = {&mp_type_textio}, .fd = STDOUT_FILENO };
const mp_obj_fdfile_t mp_sys_stderr_obj = { .base = {&mp_type_textio}, .fd = STDERR_FILENO };
+
+#endif // MICROPY_PY_IO