mdbx: refine POSIX-options detection.

This commit is contained in:
Leonid Yuriev
2019-11-08 16:57:54 +03:00
parent 51440b5542
commit 6a7499c8fc
2 changed files with 10 additions and 12 deletions

View File

@@ -388,7 +388,8 @@ void osal_udelay(unsigned us) {
static unsigned threshold_us;
if (threshold_us == 0) {
#ifdef CLOCK_PROCESS_CPUTIME_ID
#if defined(_POSIX_CPUTIME) && _POSIX_CPUTIME > -1 && \
defined(CLOCK_PROCESS_CPUTIME_ID)
if (clock_getres(CLOCK_PROCESS_CPUTIME_ID, &ts)) {
int rc = errno;
log_warning("clock_getres(CLOCK_PROCESS_CPUTIME_ID), failed errno %d",