--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -21,7 +21,7 @@
 
 #include <glib.h>
 #include <string.h>
-
+#include <stdlib.h>
 #include <locale.h>
 
 #ifdef G_OS_WIN32
--- a/utils/pango-segmentation.c
+++ b/utils/pango-segmentation.c
@@ -23,10 +23,7 @@
 #include <pango/pangocairo.h>
 #include <string.h>
 #include <locale.h>
-
-#ifndef G_OS_WIN32
 #include <unistd.h>
-#endif
 
 typedef enum {
   GRAPHEME,
