measurement-kit: Fix compilation with uClibc-ng
authorRosen Penev <rosenp@gmail.com>
Fri, 30 Aug 2019 18:19:24 +0000 (11:19 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 6 Sep 2019 23:35:46 +0000 (16:35 -0700)
nextafter is not included in std with uClibc-ng. Don't use the std version

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from e613acffad65b312a75216a47898b76c19e1fd3c)

libs/measurement-kit/Makefile
libs/measurement-kit/patches/010-nextafter.patch [new file with mode: 0644]

index be53c6f8ccaa1a732c6248d61ca7fde9e70c0dfe..aa69f78ec6819cbd721ded6e84d820b5cdba8d53 100644 (file)
@@ -9,20 +9,19 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=measurement-kit
 PKG_VERSION:=0.10.5
-PKG_RELEASE=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=8b83f04f4d3c653f93bcee5a6cc5e32e6595a3feb99526017d78099fd90d4a75
 
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
-
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/libs/measurement-kit/patches/010-nextafter.patch b/libs/measurement-kit/patches/010-nextafter.patch
new file mode 100644 (file)
index 0000000..b7004a6
--- /dev/null
@@ -0,0 +1,14 @@
+--- 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;
+ }