From nobody Tue Oct 7 07:57:23 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593788375; cv=none; d=zohomail.com; s=zohoarc; b=LEL1Pq0owyr70Ru8HZpE+D9PA6hA0CFI13kTZDnU6TMdGgMW8DwPLgjrgVzxthE1Ax/eRrNTwaV7VE3SuG2+0zgT86/pfiVnpTJAWWxiwkhNzjmIDyh+a2RjgH9utggiI8I0pf80tDMIGmLZLzzuVwUMfDrr5ZX/maBppkKWSxk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593788375; 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=srUPSKtqaAn1mMUbd1++IlCCTBASkwRrKLk2aoUltZI=; b=P09DJ5WgEga2WBnAKlc39C+KRKgcA3IwP7P8wZ5IeuUKZ0Amkip4e7Sh+Lu60uUUHRVqlDBVXDGhkaqMSNZc6sX00pf1Ib5eDQi29HH7fntzsE0jrYs9Sp5ocicBtjxKxprNX3bnyzcdrheKWIVHofJLLLqvhwAKIPi9YB+dM0A= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593788374994216.13889357318465; Fri, 3 Jul 2020 07:59:34 -0700 (PDT) Received: from localhost ([::1]:35080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrNA5-0007lt-1p for importer@patchew.org; Fri, 03 Jul 2020 10:59:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrN72-0003lJ-MU for qemu-devel@nongnu.org; Fri, 03 Jul 2020 10:56:24 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:32962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrN70-0006ju-ST for qemu-devel@nongnu.org; Fri, 03 Jul 2020 10:56:24 -0400 Received: by mail-wm1-x343.google.com with SMTP id a6so22515539wmm.0 for ; Fri, 03 Jul 2020 07:56:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id s10sm14078347wme.31.2020.07.03.07.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 07:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=srUPSKtqaAn1mMUbd1++IlCCTBASkwRrKLk2aoUltZI=; b=tabBWabvR9rAPGPW+8opjMD8UrSGSzpi+Icu6HW7o6a3r822/UF7H1LuCGGfIp7AD3 1YVwcIamsQUtEjTGlvD6S5kf2XQxBK35wYprcmT+AgmkTKNhE25VojZKRpXEQsMRHDeg 3dnJUvp2VVYsM/Lw14za3qgxaRy/9vCTwHsFqbAT3wLYKeV84PBfeRSf4cKhd/NxoYNa 1FIkGMRTLu38dm2r4IpM9X8PyVrIB+JTEIem4w9pn9RLrS72uautys1xpnseVk5pz7eu 5oqbb+BPkqBDbmf/dtm6yV4JAYZ2bDAWUPhCFu8IO4JPYLSP0F0t79t/4OxeWTDKyOOF F6Gg== 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=srUPSKtqaAn1mMUbd1++IlCCTBASkwRrKLk2aoUltZI=; b=hSBeCx78AWBsqONVtqrL3msc77G+D/nV1nTvzz3BOHXARaC9G8mXC7Hp7aps+R7U+n kizk8R9AU+dke5FBXRYyW99O3QLCsfzW49upErgF1p8fjsShYOJA4Xqhr66HXx8r+7/B J4vuKqgrWAs9fOTYgoM8XKbcHe6DjPQyB6rosbIgoTtqWDXgTHbdzKlK2hjXPW482fPA 39wctAWQn5Bk7g9RffyViIniN3O9Mllne/UkihWpIb69BuXylKi9IGmgpyd9kY4kwnT3 F0ELNcvlD6+yBL91zVA7MvL8nCHVmr6YO5jRH2hdUpi7TF+NlF3LUHXUngpU04JlBR4m SLUw== X-Gm-Message-State: AOAM532358tm61SRGs4Qv0Sl9iwIl4WWKsOTuFODQ4rjWqupTHVq2J6U 1RFwfyxG3Y3ROwNER1vG2ITOmy9CINR/Gg== X-Google-Smtp-Source: ABdhPJwGNwumLD3T1Qz741QSvoO4gMrZzOj/5VqiGPnwTYrShI/KeIjbAiHMN4onzicsx2+PpM/Eng== X-Received: by 2002:a1c:4846:: with SMTP id v67mr39261676wma.175.1593788181311; Fri, 03 Jul 2020 07:56:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 4/9] osdep.h: Always include if it exists Date: Fri, 3 Jul 2020 15:56:09 +0100 Message-Id: <20200703145614.16684-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200703145614.16684-1-peter.maydell@linaro.org> References: <20200703145614.16684-1-peter.maydell@linaro.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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x343.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=_AUTOLEARN 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: David Carlier , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" 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 [PMM: Expanded commit message] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- configure | 8 ++++++++ include/qemu/osdep.h | 2 +- hw/xen/xen-legacy-backend.c | 1 - util/oslib-posix.c | 1 - 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configure b/configure index ddc53d873ef..d131f760d8f 100755 --- a/configure +++ b/configure @@ -3212,6 +3212,11 @@ if ! check_include "ifaddrs.h" ; then have_ifaddrs_h=3Dno fi =20 +have_sys_signal_h=3Dno +if check_include "sys/signal.h" ; then + have_sys_signal_h=3Dyes +fi + ########################################## # VTE probe =20 @@ -7398,6 +7403,9 @@ fi if test "$have_broken_size_max" =3D "yes" ; then echo "HAVE_BROKEN_SIZE_MAX=3Dy" >> $config_host_mak fi +if test "$have_sys_signal_h" =3D "yes" ; then + echo "CONFIG_SYS_SIGNAL=3Dy" >> $config_host_mak +fi =20 # 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 0d26a1b9bd0..6e0cf9132d9 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -104,7 +104,7 @@ extern int daemon(int, int); #include #include =20 -#ifdef __OpenBSD__ +#ifdef CONFIG_SYS_SIGNAL #include #endif =20 diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c index 7d4b13351e0..965abe3ad34 100644 --- a/hw/xen/xen-legacy-backend.c +++ b/hw/xen/xen-legacy-backend.c @@ -23,7 +23,6 @@ */ =20 #include "qemu/osdep.h" -#include =20 #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" =20 #ifdef CONFIG_LINUX --=20 2.20.1