Fix build on Android API < 26.
This commit is contained in:
parent
f1d10089fa
commit
7310274a4f
@ -172,6 +172,11 @@ void CompilerGLSL::init()
|
|||||||
const struct lconv *conv = localeconv();
|
const struct lconv *conv = localeconv();
|
||||||
if (conv && conv->decimal_point)
|
if (conv && conv->decimal_point)
|
||||||
current_locale_radix_character = *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
|
#else
|
||||||
// localeconv, the portable function is not MT safe ...
|
// localeconv, the portable function is not MT safe ...
|
||||||
const char *decimal_point = nl_langinfo(RADIXCHAR);
|
const char *decimal_point = nl_langinfo(RADIXCHAR);
|
||||||
|
Loading…
Reference in New Issue
Block a user