diff --git a/py/bc.h b/py/bc.h
index 11f5bb632ff0e1d4a13c9b75825bda5ac7d3a14f..4707da17934f9572e88ee36b65e5c3a58b13125c 100644
--- a/py/bc.h
+++ b/py/bc.h
@@ -78,7 +78,7 @@ typedef struct _mp_code_state_t {
     mp_exc_stack_t *exc_sp;
     mp_obj_dict_t *old_globals;
     #if MICROPY_STACKLESS
-    struct _mp_code_state *prev;
+    struct _mp_code_state_t *prev;
     #endif
     size_t n_state;
     // Variable-length