diff --git a/py/emitcommon.c b/py/emitcommon.c
index 30f5ace923eadc6018bb0937953daeb20f38ac77..044ec3463a76db7706945c841b74ea794c0092bb 100644
--- a/py/emitcommon.c
+++ b/py/emitcommon.c
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <string.h>
 #include <stdint.h>
 #include <assert.h>
 
diff --git a/py/stream.c b/py/stream.c
index 52e5f6d4b23baf609bb6c8d4def71a558bbb758a..f3df70fa51e632ae970f738e5161f9d518bb0c17 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <string.h>
 
 #include "nlr.h"
 #include "misc.h"