summaryrefslogtreecommitdiffstats
path: root/meta/recipes-rt
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-rt')
-rw-r--r--meta/recipes-rt/rt-tests/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch44
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests.inc6
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests_git.bb1
3 files changed, 3 insertions, 48 deletions
diff --git a/meta/recipes-rt/rt-tests/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch b/meta/recipes-rt/rt-tests/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch
deleted file mode 100644
index 915f8baa61..0000000000
--- a/meta/recipes-rt/rt-tests/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From e1f5f9379a68471c9f5fb0859e87dd84001b0b6f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 28 Jan 2025 15:03:59 -0800
4Subject: [PATCH] sched_attr: Do not define for glibc >= 2.41
5
6glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions
7and struct sched_attr. Therefore, it needs to be checked for here as well before
8defining sched_attr
9
10Define sched_attr conditionally on SCHED_ATTR_SIZE_VER0
11
12Fixes builds with glibc/trunk
13
14[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=21571ca0d70302909cf72707b2a7736cf12190a0;hp=298bc488fdc047da37482f4003023cb9adef78f8
15
16Upstream-Status: Submitted [https://lore.kernel.org/linux-rt-users/20250128230838.2311298-1-raj.khem@gmail.com/T/#u]
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18Cc: Clark Williams <williams@redhat.com>
19Cc: John Kacur <jkacur@redhat.com>
20Cc: rt-users <linux-rt-users@vger.kernel.org>
21---
22 src/include/rt-sched.h | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/src/include/rt-sched.h b/src/include/rt-sched.h
26index 80171c7..9cf0e3a 100644
27--- a/src/include/rt-sched.h
28+++ b/src/include/rt-sched.h
29@@ -42,6 +42,8 @@
30 #define __NR_sched_getattr 275
31 #endif
32
33+/* sched_attr is not defined in glibc < 2.41 */
34+#ifndef SCHED_ATTR_SIZE_VER0
35 struct sched_attr {
36 uint32_t size;
37 uint32_t sched_policy;
38@@ -68,4 +70,6 @@ int sched_getattr(pid_t pid,
39 unsigned int size,
40 unsigned int flags);
41
42+#endif /* SCHED_ATTR_SIZE_VER0 */
43+
44 #endif /* __RT_SCHED_H__ */
diff --git a/meta/recipes-rt/rt-tests/rt-tests.inc b/meta/recipes-rt/rt-tests/rt-tests.inc
index a2e8558c4c..2042768d5a 100644
--- a/meta/recipes-rt/rt-tests/rt-tests.inc
+++ b/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -1,6 +1,6 @@
1SRCREV = "f5b910a90b6f5ab0ef6df392e009ffe1429d53af" 1SRCREV = "9166c3f0bb9c5d3e31dc80aff165a5073b5ac5be"
2PV = "2.8" 2PV = "2.9"
3PE = "1" 3PE = "1"
4 4
5SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git;branch=main;protocol=https" 5SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git;branch=main;protocol=https;tag=v${PV}"
6 6
diff --git a/meta/recipes-rt/rt-tests/rt-tests_git.bb b/meta/recipes-rt/rt-tests/rt-tests_git.bb
index 5fa980dbdf..1f48e143d4 100644
--- a/meta/recipes-rt/rt-tests/rt-tests_git.bb
+++ b/meta/recipes-rt/rt-tests/rt-tests_git.bb
@@ -13,7 +13,6 @@ SRC_URI += " \
13 file://run-ptest \ 13 file://run-ptest \
14 file://rt_bmark.py \ 14 file://rt_bmark.py \
15 file://0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch \ 15 file://0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch \
16 file://0001-sched_attr-Do-not-define-for-glibc-2.41.patch \
17 " 16 "
18 17
19# rt-tests needs PI mutex support in libc 18# rt-tests needs PI mutex support in libc