From patchwork Mon Jul 13 14:10:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 235409 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2880581ilg; Mon, 13 Jul 2020 07:17:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC2tEU1nC44cZY/N4djVyuVoUXeMQ6S3q2zoFVHTOR1KPuFx/Dmhf+TaDr9qrvhjs12I86 X-Received: by 2002:a25:bd4d:: with SMTP id p13mr293482ybm.139.1594649832284; Mon, 13 Jul 2020 07:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594649832; cv=none; d=google.com; s=arc-20160816; b=dDcZQeOKYp70D6jSnM7rdBqsTojSLyTW8c9Dw2NVDjCuGUE4bc5kRRhSxB0R1pL4gD 1H24XBwAbyUTq7rt8tET2ViN8JvV1taWOrMU9WlJGvZkPJKGY4Q8fkoX5vBU0CA5HJfx +WMLQmj5HYlp0fY/McxJFfwiH1TKwqjgEJB72etdpyscUr+HCpJ6/4WfBhRgQ/eVAXQq 0eeSu6q2VvM5MxvsAsRBs8Tlcf0Jo9uxBzDsjOvnFYjhZqaEjOqnpiStvvuLN/I5F0mF 3J9x7MpmoZxZRAJVcAqNduasvRrH2if2VYyWu3TIziqYz/dM4CnWErocbxJ1BgAT8u+B O4og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=e5ekV9cWmtxxKazK6zrxMH+2NJII48iBTB73eXHStJw=; b=l9zYzibG74jmoxQTLZW8Slzl1CIpuNDxhH81uuwPXKqkqxy5TSG/v6TrsDzXQO3cDH 614otIIq6L1ovNvueK63k5MrF3qljBciGAN/0Yzs8oReX20ljkBMrSGldShm6xDg9bbQ bp3UD63nhq8uVZKr2vzUAegZTn8cPHzqgPQbPZ+t0TUjafziZNVqHK7d9jqaNxzMwIh2 gXAmVzVN0TPtbXMlIgh2G+PKE7pf4kESXF6TBoZufldmdARS6sdLUX3xHqQLQ6ptvJHZ 5E8jJQNZ4GHfwfO+uRJ/ikYOqw8scPlpdUsvGpgfyW5ZGfagA7j68TiDQX68JY8h5weZ ZoJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A2qq2K4i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g131si14287574ybg.82.2020.07.13.07.17.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Jul 2020 07:17:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A2qq2K4i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juzGZ-000723-OZ for patch@linaro.org; Mon, 13 Jul 2020 10:17:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juzAx-0005LI-Tf for qemu-devel@nongnu.org; Mon, 13 Jul 2020 10:11:23 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:55576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1juzAv-0006dY-1B for qemu-devel@nongnu.org; Mon, 13 Jul 2020 10:11:23 -0400 Received: by mail-wm1-x341.google.com with SMTP id g75so13445358wme.5 for ; Mon, 13 Jul 2020 07:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=e5ekV9cWmtxxKazK6zrxMH+2NJII48iBTB73eXHStJw=; b=A2qq2K4ilM10laE4/iIpInXguf23DGSPLEhiNTlhjbS8aUQUo1/BJ5GLNCVEHTi0yW eV06/XLoTxnr6AaldvbBfXw+MXm6rS0ApXsOCv4U7XG+yp1ANcvVW73xWurz5K7B7bag P8n582H4DwN1Gt3MSSuETr0ytY/t1pCsjQV96ibHbXHMdvl+rRpc5mLURyHOeEv9ZwdC zrPWPt/nzxnwCqXYSwbhGbOyrRp5Rg013QfMdjihAkgTcUfk/hcvMYduLhYQy7dPCJdF cz+HZMFdK/4cZywlT91aeSN5rA0s2ZdrykbNLMvyJbSf6FwRINAmgZ/K8rLcJMtGCcyk L0lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e5ekV9cWmtxxKazK6zrxMH+2NJII48iBTB73eXHStJw=; b=sC2Y64fuTMFwlKyhK0DfoccYK9PSqt3vTgRGS1+fSeHB4odzn9UAjx+YBV1KNO6Ww1 bfQdG17hrR0l4vIpe3xHiwlq78/iKICrPH6xli8LTfUMaNCIZkgFPaeFEBLg8X3JAOvA XIfUBmZQHTP/T6sCVuWEokzoLilx2XSmPLQ5JEf9u0srLyIOjqOiFcPZk0Od8L0KZW2U c6S/4mwVVuXkeFLMjZgs6FZPK3IWt6gr29T6fgq9v12uj8jUSHkZlmJ5vrD5iBiFMVOG lRV+v9JfK+PQXeOA1KPrjazmVfNcVhY4vksh6jhTffV9ODR7xMNRbzS/A7KwuXQBrry2 0KTw== X-Gm-Message-State: AOAM532stZT6T8svGydHaQDzHz1ym1qhUV/vJeDJf30gq7qnBKF70LyJ uE7A4AsXFa+r1rLFsLat68tWunIAjUOmpg== X-Received: by 2002:a05:600c:2253:: with SMTP id a19mr158591wmm.136.1594649479182; Mon, 13 Jul 2020 07:11:19 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c136sm24031297wmd.10.2020.07.13.07.11.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 07:11:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/25] osdep.h: Always include if it exists Date: Mon, 13 Jul 2020 15:10:50 +0100 Message-Id: <20200713141104.5139-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200713141104.5139-1-peter.maydell@linaro.org> References: <20200713141104.5139-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: David CARLIER Regularize our handling of : currently we include it in osdep.h, but only for OpenBSD, and we include it without an ifdef guard in a couple of C files. This causes problems for Haiku, which doesn't have that header. Instead, check in configure whether sys/signal.h exists, and if it does then always include it from osdep.h. Signed-off-by: David Carlier Reviewed-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell Message-id: 20200703145614.16684-5-peter.maydell@linaro.org [PMM: Expanded commit message; rename to HAVE_SYS_SIGNAL_H] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- configure | 10 ++++++++++ include/qemu/osdep.h | 2 +- hw/xen/xen-legacy-backend.c | 1 - util/oslib-posix.c | 1 - 4 files changed, 11 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/configure b/configure index 429c938708e..bc3b9ad9317 100755 --- a/configure +++ b/configure @@ -3244,6 +3244,13 @@ if check_include "libdrm/drm.h" ; then have_drm_h=yes fi +######################################### +# sys/signal.h check +have_sys_signal_h=no +if check_include "sys/signal.h" ; then + have_sys_signal_h=yes +fi + ########################################## # VTE probe @@ -7433,6 +7440,9 @@ fi if test "$have_openpty" = "yes" ; then echo "HAVE_OPENPTY=y" >> $config_host_mak fi +if test "$have_sys_signal_h" = "yes" ; then + echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak +fi # Work around a system header bug with some kernel/XFS header # versions where they both try to define 'struct fsxattr': diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 0fc206ae615..14059bce5a7 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -104,7 +104,7 @@ extern int daemon(int, int); #include #include -#ifdef __OpenBSD__ +#ifdef HAVE_SYS_SIGNAL_H #include #endif diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c index 083d8dc1b28..b61a4855b7b 100644 --- a/hw/xen/xen-legacy-backend.c +++ b/hw/xen/xen-legacy-backend.c @@ -23,7 +23,6 @@ */ #include "qemu/osdep.h" -#include #include "hw/sysbus.h" #include "hw/boards.h" diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 39ddc77c85b..7ad9195c445 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -38,7 +38,6 @@ #include "qemu/sockets.h" #include "qemu/thread.h" #include -#include #include "qemu/cutils.h" #ifdef CONFIG_LINUX