From 7657ad78553cbb8e6ceb8e971b1e5820727b020b Mon Sep 17 00:00:00 2001 From: Eugene Golushkov Date: Wed, 18 Oct 2023 17:07:37 +0200 Subject: [PATCH] Fixed Android build - reasonable defaults for HAS_REMOTE_API and INSTALL to avoid including unavailable curl.h and wordexp.h --- include/date/tz.h | 2 +- src/tz.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/date/tz.h b/include/date/tz.h index 962d5d5..e2def47 100644 --- a/include/date/tz.h +++ b/include/date/tz.h @@ -49,7 +49,7 @@ #ifndef HAS_REMOTE_API # if USE_OS_TZDB == 0 -# ifdef _WIN32 +# if defined _WIN32 || defined __ANDROID__ # define HAS_REMOTE_API 0 # else # define HAS_REMOTE_API 1 diff --git a/src/tz.cpp b/src/tz.cpp index 345afa8..4ca7188 100644 --- a/src/tz.cpp +++ b/src/tz.cpp @@ -139,6 +139,9 @@ struct index_entry_t { // the current time zone. On Win32 windows.h provides a means to do it. // gcc/mingw supports unistd.h on Win32 but MSVC does not. +#ifdef __ANDROID__ +# define INSTALL . +#endif #ifdef _WIN32 # ifdef WINAPI_FAMILY # include