diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-sched_attr-Do-not-define-for-glibc-2.41.patch | 42 | ||||
| -rw-r--r-- | meta/recipes-extended/ltp/ltp_20240930.bb | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-sched_attr-Do-not-define-for-glibc-2.41.patch b/meta/recipes-extended/ltp/ltp/0001-sched_attr-Do-not-define-for-glibc-2.41.patch new file mode 100644 index 0000000000..58d665c7dd --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-sched_attr-Do-not-define-for-glibc-2.41.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 38ac9ed7a4f7e2dcedb3c13d807ad0575435bab4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 30 Oct 2024 14:37:12 -0700 | ||
| 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://lists.linux.it/pipermail/ltp/2024-October/040678.html] | ||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | --- | ||
| 19 | include/lapi/sched.h | 3 +++ | ||
| 20 | 1 file changed, 3 insertions(+) | ||
| 21 | |||
| 22 | diff --git a/include/lapi/sched.h b/include/lapi/sched.h | ||
| 23 | index 26fdb628d..e1c7ff011 100644 | ||
| 24 | --- a/include/lapi/sched.h | ||
| 25 | +++ b/include/lapi/sched.h | ||
| 26 | @@ -15,6 +15,8 @@ | ||
| 27 | #include "lapi/syscalls.h" | ||
| 28 | #include "lapi/sched.h" | ||
| 29 | |||
| 30 | +/* sched_attr is not defined in glibc < 2.41 */ | ||
| 31 | +#ifndef SCHED_ATTR_SIZE_VER0 | ||
| 32 | struct sched_attr { | ||
| 33 | uint32_t size; | ||
| 34 | |||
| 35 | @@ -44,6 +46,7 @@ static inline int sched_getattr(pid_t pid, struct sched_attr *attr, | ||
| 36 | { | ||
| 37 | return syscall(__NR_sched_getattr, pid, attr, size, flags); | ||
| 38 | } | ||
| 39 | +#endif | ||
| 40 | |||
| 41 | #ifndef HAVE_CLONE3 | ||
| 42 | struct clone_args { | ||
diff --git a/meta/recipes-extended/ltp/ltp_20240930.bb b/meta/recipes-extended/ltp/ltp_20240930.bb index ac8bea4244..3fe8772ea7 100644 --- a/meta/recipes-extended/ltp/ltp_20240930.bb +++ b/meta/recipes-extended/ltp/ltp_20240930.bb | |||
| @@ -29,6 +29,7 @@ SRCREV = "60f81419c43f94ec182827ef0b9eb5baeb303419" | |||
| 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ | 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ |
| 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ | 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ |
| 31 | file://0001-Add-__clear_cache-declaration-for-clang.patch \ | 31 | file://0001-Add-__clear_cache-declaration-for-clang.patch \ |
| 32 | file://0001-sched_attr-Do-not-define-for-glibc-2.41.patch \ | ||
| 32 | " | 33 | " |
| 33 | 34 | ||
| 34 | S = "${WORKDIR}/git" | 35 | S = "${WORKDIR}/git" |
