http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58929
--- Comment #3 from Johan Lundberg <lundberj at gmail dot com> --- (In reply to Jonathan Wakely from comment #2) > I suppose we could turn all timed waiting functions into sleeps, and wait() > into an infinite loop, when libpthread is not linked in, but I'd prefer not > to add that complexity. I agree, that sounds too much. The documentation of -pthread states that it sets flags for the preprocessor in addition to the linker and at least on my system, _REENTRANT is set by -pthreads. If that's a canonical way to detect threading support I suggest checking it in the headers that rely on threading: #ifndef _REENTRANT #error "No thread support enabled." #endif If there are reasons this is not a good idea so be it.