From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 66842158B20 for ; Mon, 03 Feb 2025 09:19:18 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 2EE38342FF8 for ; Mon, 03 Feb 2025 09:19:18 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 31B201103B6; Mon, 03 Feb 2025 09:19:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 292551103B6 for ; Mon, 03 Feb 2025 09:19:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D49F3343016 for ; Mon, 03 Feb 2025 09:19:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DBD7118F6 for ; Mon, 03 Feb 2025 09:19:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1738574332.a9d75de89fc001b6907ead24459aab336d7b6066.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/, app-emulation/qemu/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/qemu/files/qemu-9.2.0-glibc-2.41.patch app-emulation/qemu/qemu-9.2.0.ebuild X-VCS-Directories: app-emulation/qemu/files/ app-emulation/qemu/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: a9d75de89fc001b6907ead24459aab336d7b6066 X-VCS-Branch: master Date: Mon, 03 Feb 2025 09:19:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 29efb2fb-f996-42b3-951c-a7fd52a98405 X-Archives-Hash: a2118dff7618ef32f5276cf628f4f2e2 commit: a9d75de89fc001b6907ead24459aab336d7b6066 Author: Kostadin Shishmanov protonmail com> AuthorDate: Fri Jan 31 14:36:03 2025 +0000 Commit: Sam James gentoo org> CommitDate: Mon Feb 3 09:18:52 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9d75de8 app-emulation/qemu: fix build with glibc 2.41 Closes: https://bugs.gentoo.org/949098 Signed-off-by: Kostadin Shishmanov protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/40399 Signed-off-by: Sam James gentoo.org> .../qemu/files/qemu-9.2.0-glibc-2.41.patch | 45 ++++++++++++++++++++++ app-emulation/qemu/qemu-9.2.0.ebuild | 4 +- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/app-emulation/qemu/files/qemu-9.2.0-glibc-2.41.patch b/app-emulation/qemu/files/qemu-9.2.0-glibc-2.41.patch new file mode 100644 index 000000000000..ea52a1c94656 --- /dev/null +++ b/app-emulation/qemu/files/qemu-9.2.0-glibc-2.41.patch @@ -0,0 +1,45 @@ +https://bugs.gentoo.org/949098 +https://lists.nongnu.org/archive/html/qemu-devel/2024-10/msg02221.html + +glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions +and struct sched_attr. Therefore, it needs to be checked for here as well before +defining sched_attr + +Define sched_attr conditionally on SCHED_ATTR_SIZE_VER0 + +Fixes builds with glibc/trunk + +[1] +https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=21571ca0d70302909cf72707b2a7736cf12190a0;hp=298bc488fdc047da37482f4003023cb9adef78f8 + +Signed-off-by: Khem Raj +Cc: Laurent Vivier +Cc: Paolo Bonzini +--- +v2: Use SCHED_ATTR_SIZE_VER0 instead of glibc version check + + linux-user/syscall.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 1ce4c79..a407d4a 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -358,7 +358,8 @@ _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len, + #define __NR_sys_sched_setaffinity __NR_sched_setaffinity + _syscall3(int, sys_sched_setaffinity, pid_t, pid, unsigned int, len, + unsigned long *, user_mask_ptr); +-/* sched_attr is not defined in glibc */ ++/* sched_attr is not defined in glibc < 2.41 */ ++#ifndef SCHED_ATTR_SIZE_VER0 + struct sched_attr { + uint32_t size; + uint32_t sched_policy; +@@ -371,6 +372,7 @@ struct sched_attr { + uint32_t sched_util_min; + uint32_t sched_util_max; + }; ++#endif + #define __NR_sys_sched_getattr __NR_sched_getattr + _syscall4(int, sys_sched_getattr, pid_t, pid, struct sched_attr *, attr, + unsigned int, size, unsigned int, flags); diff --git a/app-emulation/qemu/qemu-9.2.0.ebuild b/app-emulation/qemu/qemu-9.2.0.ebuild index a6895240627d..e62552d849ff 100644 --- a/app-emulation/qemu/qemu-9.2.0.ebuild +++ b/app-emulation/qemu/qemu-9.2.0.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 @@ -319,7 +319,7 @@ PATCHES=( "${FILESDIR}"/${PN}-9.2.0-capstone-include-path.patch "${FILESDIR}"/${PN}-8.1.0-skip-tests.patch "${FILESDIR}"/${PN}-8.1.0-find-sphinx.patch - + "${FILESDIR}"/${PN}-9.2.0-glibc-2.41.patch ) QA_PREBUILT="