diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-23 23:34:43 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-25 11:08:06 +0100 |
commit | 6e8a5fc7255474937bc9bc44c07523d04d7a3a93 (patch) | |
tree | d2564b30f31c4fcf6304f53befebef13807373fb /meta/recipes-extended/ltp | |
parent | f9dea233bb3dd18e51a825a1420621d9de926f2c (diff) | |
download | poky-6e8a5fc7255474937bc9bc44c07523d04d7a3a93.tar.gz |
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>
Diffstat (limited to 'meta/recipes-extended/ltp')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch | 36 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp_20220527.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch b/meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch new file mode 100644 index 0000000000..e49f53a9e2 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 11e503344c36c1c7df3e455d81736dc4a5b43775 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 23 Aug 2022 23:20:53 -0700 | ||
4 | Subject: [PATCH] rt-migrate: Use int instead of pthread_t for thread IDs | ||
5 | |||
6 | pthread_t is opaque, but create_fifo_thread() returns integer therefore | ||
7 | on musl where thread_t is not integer, this fails to compile e.g. | ||
8 | |||
9 | | rt-migrate.c:450:14: error: incompatible integer to pointer conversion assigning to 'pthread_t' (aka 'struct __pthread *') from 'int' [-Wint-conversion] | ||
10 | | threads[i] = create_fifo_thread(start_task, (void *)i, | ||
11 | | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
12 | |||
13 | Align the types used to fix the problems. | ||
14 | |||
15 | Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2022-August/030239.html] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | testcases/realtime/func/rt-migrate/rt-migrate.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/testcases/realtime/func/rt-migrate/rt-migrate.c b/testcases/realtime/func/rt-migrate/rt-migrate.c | ||
22 | index 3e6c82a2fb..97ab604c7f 100644 | ||
23 | --- a/testcases/realtime/func/rt-migrate/rt-migrate.c | ||
24 | +++ b/testcases/realtime/func/rt-migrate/rt-migrate.c | ||
25 | @@ -394,7 +394,7 @@ static void stop_log(int sig) | ||
26 | |||
27 | int main(int argc, char **argv) | ||
28 | { | ||
29 | - pthread_t *threads; | ||
30 | + int *threads; | ||
31 | long i; | ||
32 | int ret; | ||
33 | struct timespec intv; | ||
34 | -- | ||
35 | 2.37.2 | ||
36 | |||
diff --git a/meta/recipes-extended/ltp/ltp_20220527.bb b/meta/recipes-extended/ltp/ltp_20220527.bb index a547298828..09c7250608 100644 --- a/meta/recipes-extended/ltp/ltp_20220527.bb +++ b/meta/recipes-extended/ltp/ltp_20220527.bb | |||
@@ -39,6 +39,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht | |||
39 | file://0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch \ | 39 | file://0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch \ |
40 | file://0001-lapi-pidfd-adding-pidfd-header-file.patch \ | 40 | file://0001-lapi-pidfd-adding-pidfd-header-file.patch \ |
41 | file://0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch \ | 41 | file://0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch \ |
42 | file://0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch \ | ||
42 | " | 43 | " |
43 | 44 | ||
44 | S = "${WORKDIR}/git" | 45 | S = "${WORKDIR}/git" |