packages/libs/measurement-kit/patches/010-nextafter.patch
Rosen Penev e613acffad
measurement-kit: Fix compilation with uClibc-ng
nextafter is not included in std with uClibc-ng. Don't use the std version

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-09-01 13:34:43 -07:00

14 lines
417 B
Diff

--- a/include/private/catch.hpp
+++ b/include/private/catch.hpp
@@ -11095,7 +11095,11 @@ bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) {
template <typename FP>
FP step(FP start, FP direction, int steps) {
for (int i = 0; i < steps; ++i) {
+#ifndef __UCLIBC__
start = std::nextafter(start, direction);
+#else
+ start = ::nextafterf(start, direction);
+#endif
}
return start;
}