py/mpthread: Include mpstate.h when defining GIL macros.
diff --git a/py/mpthread.h b/py/mpthread.h
index 7f8d4de..04d4f19 100644
--- a/py/mpthread.h
+++ b/py/mpthread.h
@@ -50,6 +50,7 @@
 #endif // MICROPY_PY_THREAD
 
 #if MICROPY_PY_THREAD && MICROPY_PY_THREAD_GIL
+#include "py/mpstate.h"
 #define MP_THREAD_GIL_ENTER() mp_thread_mutex_lock(&MP_STATE_VM(gil_mutex), 1)
 #define MP_THREAD_GIL_EXIT() mp_thread_mutex_unlock(&MP_STATE_VM(gil_mutex))
 #else