new file mode 100644
@@ -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-lapi-pidfd-adding-pidfd-header-file.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"
Fixes build on musl Signed-off-by: Khem Raj <raj.khem@gmail.com> --- ...nt-instead-of-pthread_t-for-thread-I.patch | 36 +++++++++++++++++++ meta/recipes-extended/ltp/ltp_20220527.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch