diff options
Diffstat (limited to 'meta/recipes-rt/rt-tests/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch')
-rw-r--r-- | meta/recipes-rt/rt-tests/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch | 44 |
1 files changed, 0 insertions, 44 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 @@ | |||
1 | From e1f5f9379a68471c9f5fb0859e87dd84001b0b6f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 28 Jan 2025 15:03:59 -0800 | ||
4 | Subject: [PATCH] sched_attr: Do not define for glibc >= 2.41 | ||
5 | |||
6 | glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions | ||
7 | and struct sched_attr. Therefore, it needs to be checked for here as well before | ||
8 | defining sched_attr | ||
9 | |||
10 | Define sched_attr conditionally on SCHED_ATTR_SIZE_VER0 | ||
11 | |||
12 | Fixes builds with glibc/trunk | ||
13 | |||
14 | [1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=21571ca0d70302909cf72707b2a7736cf12190a0;hp=298bc488fdc047da37482f4003023cb9adef78f8 | ||
15 | |||
16 | Upstream-Status: Submitted [https://lore.kernel.org/linux-rt-users/20250128230838.2311298-1-raj.khem@gmail.com/T/#u] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | Cc: Clark Williams <williams@redhat.com> | ||
19 | Cc: John Kacur <jkacur@redhat.com> | ||
20 | Cc: rt-users <linux-rt-users@vger.kernel.org> | ||
21 | --- | ||
22 | src/include/rt-sched.h | 4 ++++ | ||
23 | 1 file changed, 4 insertions(+) | ||
24 | |||
25 | diff --git a/src/include/rt-sched.h b/src/include/rt-sched.h | ||
26 | index 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__ */ | ||