Merge pull request #893 from KhronosGroup/fix-891

Fix build on Android API < 26.
This commit is contained in:
Hans-Kristian Arntzen 2019-03-18 10:15:20 +01:00 committed by GitHub
commit 66f32eca72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,6 +172,11 @@ void CompilerGLSL::init()
const struct lconv *conv = localeconv();
if (conv && conv->decimal_point)
current_locale_radix_character = *conv->decimal_point;
#elif defined(__ANDROID__) && __ANDROID_API__ < 26
// nl_langinfo is not supported on this platform, fall back to the worse alternative.
const struct lconv *conv = localeconv();
if (conv && conv->decimal_point)
current_locale_radix_character = *conv->decimal_point;
#else
// localeconv, the portable function is not MT safe ...
const char *decimal_point = nl_langinfo(RADIXCHAR);