From patchwork Mon Jun 21 11:04:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1495060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G7msP3WlRz9sWM for ; Mon, 21 Jun 2021 21:05:29 +1000 (AEST) Received: from localhost ([::1]:39156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvHk7-0002rs-2O for incoming@patchwork.ozlabs.org; Mon, 21 Jun 2021 07:05:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHja-0002pl-42 for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:04:54 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:48395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHjW-0003v1-UH for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:04:53 -0400 Received: from quad ([82.142.1.74]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MVv4X-1lnlLG1xtl-00RpVY; Mon, 21 Jun 2021 13:04:47 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 2/9] linux-user: Disable static assert involving __SIGRTMAX if it is missing Date: Mon, 21 Jun 2021 13:04:38 +0200 Message-Id: <20210621110445.231771-3-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210621110445.231771-1-laurent@vivier.eu> References: <20210621110445.231771-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:ppuYd3siwGHqD5LvgMYXjrTPiJtZgt4yVWY+2JGZIVRjRDk+7LB CSpG0OBeCZJc4MdldSsW2pKYKl8QSs4kknFSLvNAVi+uVIb4kYrvE52EtGSJcjLbU11ZBTz ZjPOgPs5z5Wk4BNTnMNJDbgR5/f9yiFldlqpA0n349QB3jb0phgTIk5ICn7zZr04AyRAmkT tWE5prrl1OF/SufHnaCyw== X-UI-Out-Filterresults: notjunk:1;V03:K0:hbLzzeU6BSY=:eMuOzvT0uw8CR0+jU0HiQc g6XVdm3lBx6VNj6xRlOCOC43Gib9X1awU5atsWhK67L49qQ6gBP40JAx1OZV7Bf3MZC90uWQn 9HHGCCgaiE8qrWxPt524PRrMf/BMLAARFasR2nm0+YtGGm2M4QGorzfZsYU1KbqnuifjS1G1g QlUNhKbeAc2dQgDYP385EOrL454pcK7Ydl4mqR3Z+fTfLPTxBpBHvZ8xJiEBx56LBKgDkDEfz Q7UytNHdIuolbJAzFsm22YxqvkEE4l2aH0Zb3MoPjaLHfy06Q3W76OJUOWh/ao+pt/SPe2CFm Pla2oTSqjZP3ZRdnT8aYgbrf+mUsCkj+gkLpLfS4qwUEvtF/zwYLpsLEUKXZOmikn/4wyf5cn Tz1R3bahdOrhJoGQZp8Ij15MBbenv52QwxfkBenh6FKv/2OSat9q6WnuBzN71KWqcFOqu8ePM le5V4iNm6JASTf+K1eMZ9MFH4w/bm8TB135HNDnP0npi5tQ2vCG1SDWpzGP3QpBK6yt0BXQ1L oVAxXWLYfqOjDGgfNYBRA4= Received-SPF: none client-ip=212.227.126.135; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Michael Forney Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Michael Forney This check is to ensure that the loop in signal_table_init() from SIGRTMIN to SIGRTMAX falls within the bounds of host_to_target_signal_table (_NSIG). However, it is not critical, since _NSIG is already defined to be the one larger than the largest signal supported by the system (as specified in the upcoming POSIX revision[0]). musl libc does not define __SIGRTMAX, so disabling this check when it is missing fixes one of the last remaining errors when building qemu. [0] https://www.austingroupbugs.net/view.php?id=741 Signed-off-by: Michael Forney Reviewed-by: Laurent Vivier Message-Id: <20210526190203.4255-1-mforney@mforney.org> Signed-off-by: Laurent Vivier --- linux-user/signal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c index 9016896dcda0..0f19c59deee9 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -38,7 +38,9 @@ static void host_signal_handler(int host_signum, siginfo_t *info, * Signal number 0 is reserved for use as kill(pid, 0), to test whether * a process exists without sending it a signal. */ +#ifdef __SIGRTMAX QEMU_BUILD_BUG_ON(__SIGRTMAX + 1 != _NSIG); +#endif static uint8_t host_to_target_signal_table[_NSIG] = { [SIGHUP] = TARGET_SIGHUP, [SIGINT] = TARGET_SIGINT,