summaryrefslogtreecommitdiffstatshomepage
path: root/py/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/stream.c')
-rw-r--r--py/stream.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/stream.c b/py/stream.c
index d426973e83..473eb96904 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -511,6 +511,7 @@ STATIC mp_obj_t stream_ioctl(size_t n_args, const mp_obj_t *args) {
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_ioctl_obj, 2, 3, stream_ioctl);
+#if MICROPY_STREAMS_POSIX_API
/*
* POSIX-like functions
*
@@ -519,7 +520,6 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_ioctl_obj, 2, 3, stream_ioctl);
* POSIX-compatible software to work with MicroPython streams.
*/
-
// errno-like variable. If any of the functions below returned with error
// status, this variable will contain error no.
int mp_stream_errno;
@@ -568,3 +568,5 @@ int mp_stream_posix_fsync(mp_obj_t stream) {
}
return res;
}
+
+#endif