diff --git a/esp8266/moduos.c b/esp8266/moduos.c
index a9f19d7013955a22b7aabca6eda72ab491b7f1ef..6633f5a7647fe2a30e8a358963c61d94dbaf286f 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) },