Patchwork [11/33] ltp-testsuite: fix build on uClibc exp10

login
register
mail settings
Submitter Samuel Martin
Date Nov. 22, 2012, 12:18 a.m.
Message ID <1353543503-8952-12-git-send-email-s.martin49@gmail.com>
Download mbox | patch
Permalink /patch/200897/
State Accepted
Commit b49e2c11f66254502c5071a5ded611ccd702e2bc
Headers show

Comments

Samuel Martin - Nov. 22, 2012, 12:18 a.m.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 ...tsuite-20101031-fix-build-on-uClibc-exp10.patch | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch
Peter Korsgaard - March 4, 2013, 9:29 a.m.
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
 Samuel> ---
 Samuel>  ...tsuite-20101031-fix-build-on-uClibc-exp10.patch | 22 ++++++++++++++++++++++
 Samuel>  1 file changed, 22 insertions(+)
 Samuel>  create mode 100644 package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch

 Samuel> diff --git a/package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch b/package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch
 Samuel> new file mode 100644
 Samuel> index 0000000..7a02d95
 Samuel> --- /dev/null
 Samuel> +++ b/package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch
 Samuel> @@ -0,0 +1,22 @@
 Samuel> +Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch

Nice ;)

Committed, thanks.

Patch

diff --git a/package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch b/package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch
new file mode 100644
index 0000000..7a02d95
--- /dev/null
+++ b/package/ltp-testsuite/ltp-testsuite-20101031-fix-build-on-uClibc-exp10.patch
@@ -0,0 +1,22 @@ 
+Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
+
+exp10 extension is not part of uClibc, so compute it.
+
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+
+diff -purN ltp-testsuite-20101031.orig/testcases/realtime/lib/libstats.c ltp-testsuite-20101031/testcases/realtime/lib/libstats.c
+--- ltp-testsuite-20101031.orig/testcases/realtime/lib/libstats.c	2012-10-22 23:19:02.306646174 +0200
++++ ltp-testsuite-20101031/testcases/realtime/lib/libstats.c	2012-10-22 23:25:41.554847766 +0200
+@@ -46,6 +46,11 @@
+ #include <libstats.h>
+ #include <librttest.h>
+ 
++#ifdef __UCLIBC__
++/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
++#define exp10(x) (exp((x) * log(10)))
++#endif /* __UCLIBC__ */
++
+ int save_stats = 0;
+ 
+ /* static helper functions */