diff --git a/glib/deprecated/gthread.h b/glib/deprecated/gthread.h
index 462bb8f..500f72f 100644
--- a/glib/deprecated/gthread.h
+++ b/glib/deprecated/gthread.h
@@ -120,6 +120,7 @@ void     g_thread_foreach      (GFunc             thread_func,
                                 gpointer          user_data);
 
 #ifndef G_OS_WIN32
+#include <sys/types.h>
 #include <pthread.h>
 #endif
 
