diff --git a/lib/crt0_common.c b/lib/crt0_common.c
index d21054dd..74ebf321 100644
--- a/lib/crt0_common.c
+++ b/lib/crt0_common.c
@@ -9,6 +9,8 @@
 #include<string.h>
 #include<setjmp.h>
 #include<unistd.h>
+#include<rthread.h>
+#include<errno.h>
 
 #include<ssp/ssp.h>