Stefan Zimmermann created THRIFT-3993:
-----------------------------------------
Summary: error: cannot convert 'const thrift_timespec*' to 'const
timespec*'
Key: THRIFT-3993
URL: https://issues.apache.org/jira/browse/THRIFT-3993
Project: Thrift
Issue Type: Bug
Components: C++ - Library
Environment: Windows, MinGW/[MSYS2|https://msys2.github.io], GCC 6.2.0
Reporter: Stefan Zimmermann
Priority: Blocker
Compiling {{7ab125a253e5aebbf2a0ed9a0a1602a4b879eca7}} under MinGW/MSYS2 with
GCC 6.2.0:
{code}
src/thrift/concurrency/Mutex.cpp: In member function 'bool
apache::thrift::concurrency::Mutex::impl::timedlock(int64_t) const':
src/thrift/concurrency/Mutex.cpp:148:59: error: cannot convert
'thrift_timespec*' to 'const timespec*' for argument '2' to 'int
pthread_mutex_timedlock(void**, const timespec*)'
int ret = pthread_mutex_timedlock(&pthread_mutex_, &ts);
{code}
{code}
src/thrift/concurrency/Monitor.cpp: In member function 'int
apache::thrift::concurrency::Monitor::Impl::waitForTime(const thrift_timespec*)
const':
src/thrift/concurrency/Monitor.cpp:108:69: error: cannot convert 'const
thrift_timespec*' to 'const timespec*' for argument '3' to 'int
pthread_cond_timedwait(void**, void**, const timespec*)'
return pthread_cond_timedwait(&pthread_cond_, mutexImpl, abstime);
{code}
It works of course when {{&ts}} and {{abstime}} are prefixed with {{(const
timespec*)}}. I just don't know if that's the best solution in this case :)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)