http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49745
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-15 10:47:46 UTC --- Then you probably could use _GLIBCXX_HAS_GTHREADS as the macro to avoid including unistd.h and assuming that _POSIX_TIMEOUT is defined. Though perhaps better would be to call it _GTHREADS_ASSUME_POSIX_TIMEOUTS or similar and define it in some libstdc++ headers before including gthr.h.