diff --git a/CPP/Windows/TimeUtils.cpp b/CPP/Windows/TimeUtils.cpp index 4e3bc590..59c2df07 100644 --- a/CPP/Windows/TimeUtils.cpp +++ b/CPP/Windows/TimeUtils.cpp @@ -260,7 +260,13 @@ bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, Cygwin 2.9, mingw, MSVC 14, Android 9.0. Android NDK defines TIME_UTC but doesn't have the timespec_get(). */ -#if defined(TIME_UTC) && !defined(__ANDROID__) +#if defined(__ANDROID__) +#include +#if __ANDROID_API__ >= 29 +#define ZIP7_USE_timespec_get +// #pragma message("ZIP7_USE_timespec_get") +#endif +#elif defined(TIME_UTC) #define ZIP7_USE_timespec_get // #pragma message("ZIP7_USE_timespec_get") #elif defined(CLOCK_REALTIME)