]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix timefn on android
authorNick Terrell <terrelln@fb.com>
Wed, 22 Jan 2020 02:57:16 +0000 (18:57 -0800)
committerNick Terrell <terrelln@fb.com>
Wed, 22 Jan 2020 02:57:16 +0000 (18:57 -0800)
programs/timefn.c
programs/timefn.h

index 096e1910bf4bc0c8122ec4a25d66c5992298101d..4025063eb79a24821058dcdc8993e40045c5df5b 100644 (file)
@@ -84,7 +84,7 @@ PTime UTIL_getSpanTimeNano(UTIL_time_t clockStart, UTIL_time_t clockEnd)
 
 
 #elif (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */) \
-    && defined(TIME_UTC) /* C11 requires timespec_get, but FreeBSD 11 lacks it, while still claiming C11 compliance */
+    && defined(TIME_UTC) && !defined(__ANDROID__) /* C11 requires timespec_get, but FreeBSD 11 lacks it, while still claiming C11 compliance */
 
 #include <stdlib.h>   /* abort */
 #include <stdio.h>    /* perror */
index b156a33b676c002bae2e6879bbb29f4f79b9396c..0f2b12ce89396af36171388918a00a2f958e9c9a 100644 (file)
@@ -52,7 +52,7 @@ extern "C" {
     #define UTIL_TIME_INITIALIZER 0
 
 #elif (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */) \
-    && defined(TIME_UTC) /* C11 requires timespec_get, but FreeBSD 11 lacks it, while still claiming C11 compliance */
+    && defined(TIME_UTC) && !defined(__ANDROID__) /* C11 requires timespec_get, but FreeBSD 11 lacks it, while still claiming C11 compliance */
 
     typedef struct timespec UTIL_time_t;
     #define UTIL_TIME_INITIALIZER { 0, 0 }