mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
ltp: Adjust types to match create_fifo_thread return
Fixes build on musl (From OE-Core rev: 57cac75d09ba05ccd3f14302986b3e2f14d65780) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
|||||||
|
From 11e503344c36c1c7df3e455d81736dc4a5b43775 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Tue, 23 Aug 2022 23:20:53 -0700
|
||||||
|
Subject: [PATCH] rt-migrate: Use int instead of pthread_t for thread IDs
|
||||||
|
|
||||||
|
pthread_t is opaque, but create_fifo_thread() returns integer therefore
|
||||||
|
on musl where thread_t is not integer, this fails to compile e.g.
|
||||||
|
|
||||||
|
| rt-migrate.c:450:14: error: incompatible integer to pointer conversion assigning to 'pthread_t' (aka 'struct __pthread *') from 'int' [-Wint-conversion]
|
||||||
|
| threads[i] = create_fifo_thread(start_task, (void *)i,
|
||||||
|
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Align the types used to fix the problems.
|
||||||
|
|
||||||
|
Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2022-August/030239.html]
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
testcases/realtime/func/rt-migrate/rt-migrate.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/testcases/realtime/func/rt-migrate/rt-migrate.c b/testcases/realtime/func/rt-migrate/rt-migrate.c
|
||||||
|
index 3e6c82a2fb..97ab604c7f 100644
|
||||||
|
--- a/testcases/realtime/func/rt-migrate/rt-migrate.c
|
||||||
|
+++ b/testcases/realtime/func/rt-migrate/rt-migrate.c
|
||||||
|
@@ -394,7 +394,7 @@ static void stop_log(int sig)
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
- pthread_t *threads;
|
||||||
|
+ int *threads;
|
||||||
|
long i;
|
||||||
|
int ret;
|
||||||
|
struct timespec intv;
|
||||||
|
--
|
||||||
|
2.37.2
|
||||||
|
|
||||||
@@ -39,6 +39,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht
|
|||||||
file://0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch \
|
file://0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch \
|
||||||
file://0001-lapi-pidfd-adding-pidfd-header-file.patch \
|
file://0001-lapi-pidfd-adding-pidfd-header-file.patch \
|
||||||
file://0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch \
|
file://0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch \
|
||||||
|
file://0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|||||||
Reference in New Issue
Block a user