[
https://issues.apache.org/jira/browse/THRIFT-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846311#action_12846311
]
Nathan Marz commented on THRIFT-736:
------------------------------------
This patch fixes my build problem.
> Unable to compile thrift on Mac OS X: pthread_mutex_timedlock does not exist
> on mac osx
> ---------------------------------------------------------------------------------------
>
> Key: THRIFT-736
> URL: https://issues.apache.org/jira/browse/THRIFT-736
> Project: Thrift
> Issue Type: Bug
> Components: Library (C++)
> Reporter: Nathan Marz
> Assignee: David Reiss
> Attachments:
> v1-0001-THRIFT-736.-cpp-Check-for-availability-of-pthread_mu.patch
>
>
> I ran into this trying to compile Thrift from trunk. I got the following
> build error:
> src/concurrency/Mutex.cpp:142: error: 'pthread_mutex_timedlock' was not
> declared in this scope
> Digging deeper, I found this thread which explains the issue:
> http://lists.apple.com/archives/Unix-porting/2008/Jan/msg00014.html
> It looks like you're supposed to wrap that pthread_mutex_timedlock with an
> alternate implementation if it doesn't exist.
> Since I don't use the cpp generator, as a temporary workaround I changed that
> line to the following to get it to compile:
> int ret = 1; //pthread_mutex_timedlock(&pthread_mutex_, &ts);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.