Kaydet (Commit) cf39dec9 authored tarafından Christian Lohmaier's avatar Christian Lohmaier

buildfix for icu/android – no member named 'round' in namespace 'std'

"number_decimalquantity.cpp:387:40: error: no member named 'round' in namespace 'std'; did you mean simply 'round'?"
    auto result = static_cast<int64_t>(std::round(n));
                                       ^~~~~~~~~~
                                       round
/home/cl/Android/Sdk/ndk-bundle/platforms/android-14/arch-x86/usr/include/math.h:279:8: note: 'round' declared here
double  round(double);
        ^

Change-Id: If4dc1054469f234bfa9713eded1d325c71f9f79c
üst c8b0bd4f
......@@ -56,3 +56,15 @@ diff -ur icu.org/source/configure icu/source/configure
*)
;;
esac
diff -ur icu.org/source/i18n/number_decimalquantity.cpp icu/source/i18n/number_decimalquantity.cpp
--- icu.org/source/i18n/number_decimalquantity.cpp 2017-11-21 12:39:25.068592814 +0100
+++ icu/source/i18n/number_decimalquantity.cpp 2017-11-21 12:39:53.988590886 +0100
@@ -384,7 +384,7 @@
for (; i <= -22; i += 22) n /= 1e22;
n /= DOUBLE_MULTIPLIERS[-i];
}
- auto result = static_cast<int64_t>(std::round(n));
+ auto result = static_cast<int64_t>(round(n));
if (result != 0) {
_setToLong(result);
scale -= fracLength;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment