From: Yann Collet Date: Tue, 5 Dec 2017 00:31:59 +0000 (-0800) Subject: It's still necessary to check PLATFORM_POSIX_VERSION for clock_gettime() X-Git-Tag: v1.3.3^2~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31293330d0cd3295646b208f5fa05cfa1ad8914c;p=thirdparty%2Fzstd.git It's still necessary to check PLATFORM_POSIX_VERSION for clock_gettime() glibc/uclibc is not enough --- diff --git a/programs/util.h b/programs/util.h index 38dad2ab4..af1fa7fca 100644 --- a/programs/util.h +++ b/programs/util.h @@ -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;