Skip to contentSkip to conversation

ltp-ddt: fix compile issue with gcc-6

PATCH New Denys Dmytriyenko 1 participant 1 message Nov 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ltp-ddt: fix compile issue with gcc-6

From: Denys Dmytriyenko <[email protected]>

Fixes "trace_sched.c:425:16: error: invalid operands to binary &" when compiled with gcc-6 toolchain.

---
 .../0029-trace_shed-Fix-build-with-musl.patch      | 32 ++++++++++++++++++++++
 .../recipes-devtools/ltp-ddt/ltp-ddt_20160510.bb   |  5 ++--
 2 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 meta-arago-extras/recipes-devtools/ltp-ddt/ltp-ddt/0029-trace_shed-Fix-build-with-musl.patch
meta-arago-extras/recipes-devtools/ltp-ddt/ltp-ddt/0029-trace_shed-Fix-build-with-musl.patch new file +32 -0
new file mode 100644
index 0000000..f7ece9e
@@ -0,0 +1,32 @@
+From 2f8a57f66a94210d34dd0361659a8297cf3d813f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 8 Jan 2016 07:29:24 +0000
+Subject: [PATCH 29/32] trace_shed: Fix build with musl
+
+Errors on musl are
+
+trace_sched.c:425:16: error: invalid operands to binary & (have
+'thread_sched_t * {aka struct <anonymous> *}' and 'int')
+      thrd_ndx, WEXITSTATUS(status));
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ testcases/kernel/sched/tool/trace_sched.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
+index 7815686..30dca5f 100644
+--- a/testcases/kernel/sched/tool/trace_sched.c
++++ b/testcases/kernel/sched/tool/trace_sched.c
+@@ -422,7 +422,7 @@ int main(int argc,		/* number of input parameters.                        */
+ 			if (status == (thread_sched_t *) - 1) {
+ 				fprintf(stderr,
+ 					"thread [%d] - process exited with errors %d\n",
+-					thrd_ndx, WEXITSTATUS(status));
++					thrd_ndx, WEXITSTATUS((int)status));
+ 				exit(-1);
+ 			} else {
+ 				exp_prio[thrd_ndx] = status->exp_prio;
+-- 
+2.7.0
+
meta-arago-extras/recipes-devtools/ltp-ddt/ltp-ddt_20160510.bb +3 -2
index ef31576..85016ca 100644
@@ -4,7 +4,7 @@ SECTION = "console/utils"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-PR = "r7"
+PR = "r8"
 PV_append = "+git${SRCPV}"
 
 PROVIDES += "ltp"
@@ -17,7 +17,8 @@ inherit autotools-brokensep
 SRCREV = "2926b663850e0af624b978b402a92b9828e1b187"
 BRANCH ?= "master"
 
-SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH}"
+SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH} \
+    file://0029-trace_shed-Fix-build-with-musl.patch"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.7.4