diff options
| -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" |
