From 768adc07743c4121216fdca0d8b4a0d7184ebd3c Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Tue, 21 Jan 2020 18:57:16 -0800 Subject: [PATCH] Fix timefn on android --- programs/timefn.c | 2 +- programs/timefn.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 } -- 2.47.2