]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
It's still necessary to check PLATFORM_POSIX_VERSION for clock_gettime() 940/head
authorYann Collet <cyan@fb.com>
Tue, 5 Dec 2017 00:31:59 +0000 (16:31 -0800)
committerYann Collet <cyan@fb.com>
Tue, 5 Dec 2017 00:31:59 +0000 (16:31 -0800)
glibc/uclibc is not enough

programs/util.h

index 38dad2ab45c80e671733538226e21eadc2745286..af1fa7fcae74927a6304b9329fe670352fe92dd6 100644 (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;