diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c
index b398d726617e9b5184b4f4824eed485401aa3265..61cd5a98ce1ed6a4a6bf56ff5fb09047bfbc15ed 100644
--- a/lib/utils/pyexec.c
+++ b/lib/utils/pyexec.c
@@ -53,8 +53,6 @@ STATIC bool repl_display_debugging_info = 0;
 #define EXEC_FLAG_IS_REPL (4)
 #define EXEC_FLAG_SOURCE_IS_RAW_CODE (8)
 
-extern void mp_hal_set_interrupt_char (int c);
-
 // parses, compiles and executes the code in the lexer
 // frees the lexer before returning
 // EXEC_FLAG_PRINT_EOF prints 2 EOF chars: 1 after normal output, 1 after exception output
diff --git a/zephyr/mphalport.h b/zephyr/mphalport.h
index 594bdd6d0712ae3e266a7e282ac2acaf3ddf2dd1..a634455a83aac1bc7d4dc874cbac15934d742a55 100644
--- a/zephyr/mphalport.h
+++ b/zephyr/mphalport.h
@@ -1,4 +1,5 @@
 #include <zephyr.h>
+#include "lib/utils/interrupt_char.h"
 
 static inline mp_uint_t mp_hal_ticks_us(void) {
     return sys_tick_get() * sys_clock_us_per_tick;