It's still necessary to check PLATFORM_POSIX_VERSION for clock_gettime()

glibc/uclibc is not enough
dev
Yann Collet 2017-12-04 16:31:59 -08:00
parent 0097469238
commit 31293330d0
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ static int g_utilDisplayLevel;
}
return ((clockEnd - clockStart) * (U64)rate.numer) / ((U64)rate.denom);
}
#elif defined __UCLIBC__ || ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17) || __GLIBC__ > 2)
#elif (PLATFORM_POSIX_VERSION >= 200112L) && (defined __UCLIBC__ || ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17) || __GLIBC__ > 2))
#define UTIL_TIME_INITIALIZER { 0, 0 }
typedef struct timespec UTIL_freq_t;
typedef struct timespec UTIL_time_t;