From nobody Mon May 6 13:50:26 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622056269; cv=none; d=zohomail.com; s=zohoarc; b=aWNAqFI1fo17LCsivQbnGyvA8lC5N1dXLEbKqca828FBOvdpdCIvm7hjUx54XIcR/rU95fQmqnx6QzcdxryC35OMH7eQN5a8efGhfT2NaLeOiMvRLXtnrDmoCmWTiZVGxrSqclM9tdGgDGbipAhjhwYygVJdFpiuiJ6cx132fwc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622056269; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Vv5OnGTeBMJF33/J1U18TeOHvsm5r7sKoDnGKgxlzn0=; b=U7s9YjndncHuG3/Hsq87FO6Ge4eOSHMX2l9QkvtMfJz90Kdu0aUX0a7dOcf/ADIbd+zhgZSxTsYbRa1BNNk3PZIJxMyYi7z48FiLA9gNRLE+pxwAAoGFmhmPI1zCX2oMeUwXVhONhjtqKJdlzU5dVkhx/60UYq1ycWAeZonACRM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622056269088472.8427600243998; Wed, 26 May 2021 12:11:09 -0700 (PDT) Received: from localhost ([::1]:58104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llyvs-00069K-2Y for importer2@patchew.org; Wed, 26 May 2021 15:11:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llyne-0004ny-La for qemu-devel@nongnu.org; Wed, 26 May 2021 15:02:38 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:46715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llynb-0000P7-7N for qemu-devel@nongnu.org; Wed, 26 May 2021 15:02:38 -0400 Received: by mail-pl1-x629.google.com with SMTP id d20so1084509pls.13 for ; Wed, 26 May 2021 12:02:33 -0700 (PDT) Received: from localhost ([2601:647:5180:4570:16dd:a9ff:fee7:6b79]) by smtp.gmail.com with ESMTPSA id h36sm103469pgh.63.2021.05.26.12.02.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 May 2021 12:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vv5OnGTeBMJF33/J1U18TeOHvsm5r7sKoDnGKgxlzn0=; b=MuCXJ17KFQz0YCQDaKJsoJvfS2VODNN4igX1CnNyon9FYUe0A4BsLDdwITjn2JIBbD REv5l6LwqY1u0Jax6Ibu8rDnrV4RxnasmT5qlzwOgnH+N6OsWB5E4mB+vRFLsrNT6//u bGx8j2dShs6G2rKubIvb9mPTwzYiRnK0osNpKhMLppQ4husQhKlNUo4aeF4iKsQ1FyqG Apivu6qs50Xx+Pjym6SpmXLVXEC6U+5ttAq1rp86s986f5kqNgqJ5oNLI+Jg0ti8z8+8 N8s78NIH7RyZCHSHsMnsk6YNaJ7YVRWZBsoUzJPLSghQyGsOl2Piv400XZ1rX+b2QTsi 5jZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vv5OnGTeBMJF33/J1U18TeOHvsm5r7sKoDnGKgxlzn0=; b=lu4ZY/AKX3vCKlqJqbRoZ1f/CNErQNNh8NAjQGHZj8Lk1743ks6WJ7H//Fylol4sgh PwcDAMewGrWNUhK8H9x5ScoZPmYrjBAhL6Bb1yhjWuj4B3FYvYm2ur5Y1vO8k7zOY4uk iFqp4JMa5zjaAhZvZVP0Cc7Cxkwt6HYMFX8YUrCQhb7JAo3gLN89gmxlwOk1LyfF7wEv qHhqSMWAJwdq9SZ4SCein5s9AJzRJ2Af4zgm3VZlA6MCskM7zI7/bdks4cdDkBQpqKvs xRTobkdPN4oEdY0/4+GcQwctlDHLmmdozrgNcQooM3VVxPnyAiLDruCHwT0ppevsbq6r SGuA== X-Gm-Message-State: AOAM532ONeUe0VDtG76FJ1hgI2O1++FLSEnvHM2yX1oMDLJ5wARDnhxU iz52FPumc/ce+rry5E4vz0aisVSILIlAvl5hF4I= X-Google-Smtp-Source: ABdhPJx9UuP8vJ2iA6rm4f6EXiNJI4zBvBb9A2lssAAJdmyxQ9NMqElqjmhjM4DWVkiUhbQ//deRaA== X-Received: by 2002:a17:90b:4ac2:: with SMTP id mh2mr5276779pjb.184.1622055752187; Wed, 26 May 2021 12:02:32 -0700 (PDT) From: Michael Forney To: Laurent Vivier Subject: [PATCH v2] linux-user: Disable static assert involving __SIGRTMAX if it is missing Date: Wed, 26 May 2021 12:02:03 -0700 Message-Id: <20210526190203.4255-1-mforney@mforney.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526043928.9586-1-mforney@mforney.org> References: <20210526043928.9586-1-mforney@mforney.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::629; envelope-from=mforney@mforney.org; helo=mail-pl1-x629.google.com 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @mforney-org.20150623.gappssmtp.com) Content-Type: text/plain; charset="utf-8" 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=3D741 Signed-off-by: Michael Forney Reviewed-by: Laurent Vivier --- Changes since v2: * Guard check by #ifdef __SIGRTMAX instead of removing it. linux-user/signal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c index 9016896dcd..0f19c59dee 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 !=3D _NSIG); +#endif static uint8_t host_to_target_signal_table[_NSIG] =3D { [SIGHUP] =3D TARGET_SIGHUP, [SIGINT] =3D TARGET_SIGINT, --=20 2.31.1