Android support (#799)

This PR adds support for Android, mostly just by importing the Android
module when needed.
This commit is contained in:
Marc Prud'hommeaux
2025-01-14 16:39:43 +00:00
committed by GitHub
parent 126518507b
commit e69318d4cb
5 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ bool swiftahc_cshims_strptime(const char * string, const char * format, struct t
bool swiftahc_cshims_strptime_l(const char * string, const char * format, struct tm * result, void * locale) {
// The pointer cast is fine as long we make sure it really points to a locale_t.
#ifdef __musl__
#if defined(__musl__) || defined(__ANDROID__)
const char * firstNonProcessed = strptime(string, format, result);
#else
const char * firstNonProcessed = strptime_l(string, format, result, (locale_t)locale);