commit: ccc69af73f53fbb89fd19e149ef99cf4d1f1c295 Author: Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de> AuthorDate: Tue Feb 11 16:31:12 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Feb 13 12:39:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccc69af7
dev-util/rt-tests: Fix build with glibc-2.41 Fix build with glibc-2.41. Closes: https://bugs.gentoo.org/949572 Signed-off-by: Kurt Kanzenbach <kurt <AT> kmk-computers.de> Closes: https://github.com/gentoo/gentoo/pull/40534 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-util/rt-tests/files/rt-tests-2.8-glibc.patch | 55 ++++++++++++++++++++++++ dev-util/rt-tests/rt-tests-2.8.ebuild | 6 ++- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/dev-util/rt-tests/files/rt-tests-2.8-glibc.patch b/dev-util/rt-tests/files/rt-tests-2.8-glibc.patch new file mode 100644 index 000000000000..7cfbdaa0236b --- /dev/null +++ b/dev-util/rt-tests/files/rt-tests-2.8-glibc.patch @@ -0,0 +1,55 @@ +From 280e198c39d1b17d0491d7c4e7afda97ae6c8e6f Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz <yselk...@redhat.com> +Date: Wed, 29 Jan 2025 16:46:11 -0500 +Subject: [PATCH] Fix rt-tests build with glibc-2.41 + +The sched_*attr APIs were added to glibc +https://sourceware.org/git/?p=glibc.git;a=commit;h=21571ca0d70302909cf72707b2a7736cf12190a0 + +This fixes the build conflict in rt-tests with glibc-2.4 + +Signed-off-by: Yaakov Selkowitz <yselk...@redhat.com> +Signed-off-by: John Kacur <jka...@redhat.com> +--- + src/include/rt-sched.h | 2 ++ + src/lib/rt-sched.c | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/include/rt-sched.h b/src/include/rt-sched.h +index 80171c76e0ee..dfd7f45f51cc 100644 +--- a/src/include/rt-sched.h ++++ b/src/include/rt-sched.h +@@ -42,6 +42,7 @@ + #define __NR_sched_getattr 275 + #endif + ++#if ! __GLIBC_PREREQ(2, 41) + struct sched_attr { + uint32_t size; + uint32_t sched_policy; +@@ -67,5 +68,6 @@ int sched_getattr(pid_t pid, + struct sched_attr *attr, + unsigned int size, + unsigned int flags); ++#endif + + #endif /* __RT_SCHED_H__ */ +diff --git a/src/lib/rt-sched.c b/src/lib/rt-sched.c +index 8023bc70c473..2500abde26e4 100644 +--- a/src/lib/rt-sched.c ++++ b/src/lib/rt-sched.c +@@ -14,6 +14,7 @@ + + #include "rt-sched.h" + ++#if ! __GLIBC_PREREQ(2, 41) + int sched_setattr(pid_t pid, + const struct sched_attr *attr, + unsigned int flags) +@@ -28,3 +29,4 @@ int sched_getattr(pid_t pid, + { + return syscall(__NR_sched_getattr, pid, attr, size, flags); + } ++#endif +-- +2.47.1 diff --git a/dev-util/rt-tests/rt-tests-2.8.ebuild b/dev-util/rt-tests/rt-tests-2.8.ebuild index d11236401857..8749b0d1bb86 100644 --- a/dev-util/rt-tests/rt-tests-2.8.ebuild +++ b/dev-util/rt-tests/rt-tests-2.8.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -22,6 +22,10 @@ DEPEND="${PYTHON_DEPS} sys-process/numactl" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}/${P}-glibc.patch" +) + src_prepare() { default use elibc_musl && eapply "${FILESDIR}/${P}-musl.patch"