From: Nick Terrell Date: Wed, 22 Jan 2020 02:57:16 +0000 (-0800) Subject: Fix timefn on android X-Git-Tag: v1.4.5^2~110^2~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=768adc07743c4121216fdca0d8b4a0d7184ebd3c;p=thirdparty%2Fzstd.git Fix timefn on android --- diff --git a/programs/timefn.c b/programs/timefn.c index 096e1910b..4025063eb 100644 --- a/programs/timefn.c +++ b/programs/timefn.c @@ -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 /* abort */ #include /* perror */ diff --git a/programs/timefn.h b/programs/timefn.h index b156a33b6..0f2b12ce8 100644 --- a/programs/timefn.h +++ b/programs/timefn.h @@ -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 }