diff --git a/sdk/lib/crt/math/arm/__rt_sdiv.c b/sdk/lib/crt/math/arm/__rt_sdiv.c index dea2b30e32..bc272c85d2 100644 --- a/sdk/lib/crt/math/arm/__rt_sdiv.c +++ b/sdk/lib/crt/math/arm/__rt_sdiv.c @@ -13,7 +13,11 @@ #include "__rt_div_worker.h" +#ifdef _USE_64_BITS_ ARM_DIVRESULT +#else +unsigned long long +#endif __rt_sdiv( int divisor, int dividend) @@ -21,6 +25,6 @@ __rt_sdiv( ARM_DIVRESULT result; __rt_sdiv_worker(&result, divisor, dividend); - return result; + return *(unsigned long long *)&result; } diff --git a/sdk/lib/crt/math/arm/__rt_udiv.c b/sdk/lib/crt/math/arm/__rt_udiv.c index 0d047e3c66..37f8a69958 100644 --- a/sdk/lib/crt/math/arm/__rt_udiv.c +++ b/sdk/lib/crt/math/arm/__rt_udiv.c @@ -11,7 +11,11 @@ #include "__rt_div_worker.h" +#ifdef _USE_64_BITS_ ARM_DIVRESULT +#else +unsigned long long +#endif __rt_udiv( unsigned int divisor, unsigned int dividend) @@ -19,6 +23,6 @@ __rt_udiv( ARM_DIVRESULT result; __rt_udiv_worker(&result, divisor, dividend); - return result; + return *(unsigned long long *)&result; }