diff --git a/esp8266/moduos.c b/esp8266/moduos.c index a9f19d7013..6633f5a764 100644 --- a/esp8266/moduos.c +++ b/esp8266/moduos.c @@ -33,6 +33,7 @@ #include "py/objtuple.h" #include "py/objstr.h" #include "py/runtime.h" +#include "extmod/misc.h" #include "genhdr/mpversion.h" #include "etshal.h" #include "user_interface.h" @@ -108,6 +109,9 @@ STATIC const mp_rom_map_elem_t os_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) }, { MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&os_uname_obj) }, { MP_ROM_QSTR(MP_QSTR_urandom), MP_ROM_PTR(&os_urandom_obj) }, + #if MICROPY_PY_OS_DUPTERM + { MP_ROM_QSTR(MP_QSTR_dupterm), MP_ROM_PTR(&mp_uos_dupterm_obj) }, + #endif #if MICROPY_VFS_FAT { MP_ROM_QSTR(MP_QSTR_VfsFat), MP_ROM_PTR(&mp_fat_vfs_type) }, { MP_ROM_QSTR(MP_QSTR_listdir), MP_ROM_PTR(&os_listdir_obj) },