Skip to content

Android compile with poco-1.7.5 no 'pthread_condattr_setclock' error #1403

@fantwind

Description

@fantwind

when compiling poco-1.7.5 with android platform 16 gcc toolchain,I got the following error:

src/Event_POSIX.cpp: In constructor 'Poco::EventImpl::EventImpl(bool)':
src/Event_POSIX.cpp:50:54: error: 'pthread_condattr_setclock' was not declared in this scope
  if (pthread_condattr_setclock(&attr, CLOCK_MONOTONIC))

And when I google, I got pthread_condattr_setclock did not exist in Android version prior 5.0,but HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC is defined prior to Android 5.0.
Also found this link in github: Check Android support for pthread_cond_timedwait_monotonic_np

Foundation/src/Semaphore_POSIX.cpp also use the pthread_condattr_setclock

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions