http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49745
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-14 11:13:13 UTC --- Why does gthr-posix.h even include <unistd.h>? --- gcc/gthr-posix.h.orig 2011-07-14 11:09:00.148778460 +0000 +++ gcc/gthr-posix.h 2011-07-14 11:09:01.763786789 +0000 @@ -39,7 +39,6 @@ #endif #include <pthread.h> -#include <unistd.h> typedef pthread_t __gthread_t; typedef pthread_key_t __gthread_key_t; The names from <pthread.h> will still be declared, but that's a LOT better than bringing in everything from <unistd.h> If some crufty OS needs <unistd.h> it should only be included conditionally