This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 May 2012 20:57:34 +0000
- Subject: [Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope
- Auto-submitted: auto-generated
- References: <bug-53238-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-04 20:57:34 UTC ---
_PTHREADS gets defined immediately above that test:
target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
case $target_thread_file in
posix)
CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
esac
If you're using --enable-thread=posix then it should be defined.
pthread_mutex_timedlock is part of the POSIX Threads and Timeouts options, and
if that option is supported then _POSIX_TIMEOUTS must be defined.
http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_timedlock.html