diff --git a/modules/dnn/src/layers/elementwise_layers.cpp b/modules/dnn/src/layers/elementwise_layers.cpp index 770939710d..7a45ecd31b 100644 --- a/modules/dnn/src/layers/elementwise_layers.cpp +++ b/modules/dnn/src/layers/elementwise_layers.cpp @@ -1738,10 +1738,10 @@ struct RoundFunctor : public BaseDefaultFunctor inline float calculate(float x) const { // Rounds to even numbers in halfway cases, so 2.5 -> 2, -2.5 -> -2 - int old_rounding_direction = std::fegetround(); - std::fesetround(FE_TONEAREST); + int old_rounding_direction = fegetround(); + fesetround(FE_TONEAREST); float y = std::nearbyint(x); - std::fesetround(old_rounding_direction); + fesetround(old_rounding_direction); return y; }