From nobody Sun May 19 01:15:21 2024 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=1618425871; cv=none; d=zohomail.com; s=zohoarc; b=Bb4XSVphTPyeM3cWzsPPDQ/myi7+4w6CKj9L7dvrqfvYHcE6vExvCDFoqjTr03quufqdcoBYUZn0VCB4n1Zf5AVuazI5hfk71aEmbSSrRdoQUhMqeUEiwfhWvnSSFzzn37iD+9iZ4lUptdwniqFYa5UyKijo4596L7nEG5F/Fx0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618425871; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=PKw0TOC1A/5uTX7enzJxwvXlZy0iXKLLrfg82ieLYqM=; b=BtiDz4TnrH+EwW2rzSp1KSQerCEKjzX2q7lBlz378bGXF4X83kjT5orCHcFkOldGVyy6Z5uQ2koizGY5tniymJqDolwpGza9G7m+Tlj8iYwesnYWC8uyt3JXVFCZ3Nb+PhYbqHwDZqJXrybUad19p1mS+qE4QTv7w0m7ay8PHBY= 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 1618425871490824.8546160269847; Wed, 14 Apr 2021 11:44:31 -0700 (PDT) Received: from localhost ([::1]:36182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWkV4-0004aQ-B1 for importer@patchew.org; Wed, 14 Apr 2021 14:44:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWkUO-0004AX-ON for qemu-devel@nongnu.org; Wed, 14 Apr 2021 14:43:48 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:46887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWkUM-0008Ve-OE for qemu-devel@nongnu.org; Wed, 14 Apr 2021 14:43:48 -0400 Received: by mail-wm1-x334.google.com with SMTP id z24-20020a1cf4180000b029012463a9027fso11049824wma.5 for ; Wed, 14 Apr 2021 11:43:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id a2sm236331wrt.82.2021.04.14.11.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 11:43:44 -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:mime-version :content-transfer-encoding; bh=PKw0TOC1A/5uTX7enzJxwvXlZy0iXKLLrfg82ieLYqM=; b=bWO4vHPGzGDXMTLV2pj2W7L4vQjw7lQDvOjve+YZCN7fwL17gGWWoXVj4lJqYyCsCw 7bCxQfJx56nIU5jPliHyPSpaecwsyw5J/IS3RfNBnPRGi3kpw0EUWKPwcC/l6a/+mFvD ni1GTiI66DuAVhpuZKrcxM1/SaKxi0SJRoG9pQiQ2crx1daR6AxzDIun4tuDZpHuvz95 oYR66HiZo7Qr1tnlTpkpbP22uC19r5PnIREzh3EWNj63ItKepHeuNIg1wL1IVPgjFta5 l44M1a+V+YgMfGanDAymtSZVNFLRZoWTNoxyz30NR4HcXlRayCZ8SWDD7NuQyKyjRAq9 UllQ== 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:mime-version :content-transfer-encoding; bh=PKw0TOC1A/5uTX7enzJxwvXlZy0iXKLLrfg82ieLYqM=; b=Nu7JcKioLOA4A38nfv+UP0AupMs1a8r4rMUoiIWNNujyqNGesPIlRGGo1A1ftRCy/f CIYyKe8o9hYXX3PkpMrV1w6Com8SXihWZ/ssbXs6Cm+G7GO6jdL2KQ9eEMLZehdi4iX6 Qg9a/y2ti6+2/QV/tXf12QzFp4rza+fwOh6V5hvnxWDnN8woUccEyIhZq8+V5eEVyCWm s23TjmXyXEGFfn1QymGXzO41pkvo41nMwiOygaDCDEJGU1srux3eN9KIHSi+nrrzKyNv KB+xlL7JfHH8aHhysCqcNjnIGgQayihMEau+tUXsQECkfOqEmvCLcxaYFz3DKY9l/vLi WkLw== X-Gm-Message-State: AOAM530MwPcPpikbM0Wdl7UvCdvMk666UiBxJhq1JDrM3XANntrb6Hsf Bh8X3b/QO7uYVs3p70ISFl2RYU9SrSnsX+1k X-Google-Smtp-Source: ABdhPJwoV7iMo7LDXkL+jrt/dovVY+fk39GYaiRfaAelWuNNjFoiV8bNkhAivJRMNMX2d+iH9z6/zA== X-Received: by 2002:a1c:35c6:: with SMTP id c189mr3044872wma.127.1618425825332; Wed, 14 Apr 2021 11:43:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH] include/qemu/osdep.h: Move system includes to top Date: Wed, 14 Apr 2021 19:43:43 +0100 Message-Id: <20210414184343.26235-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 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::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.google.com 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: , Cc: Paolo Bonzini , "Daniel P. Berrange" 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" Mostly osdep.h puts the system includes at the top of the file; but there are a couple of exceptions where we include a system header halfway through the file. Move these up to the top with the rest so that all the system headers we include are included before we include os-win32.h or os-posix.h. Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/qemu/osdep.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index ba15be9c569..38c96c72db2 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -104,6 +104,15 @@ extern int daemon(int, int); #include #include =20 +#ifdef CONFIG_IOVEC +#include +#endif + +#if defined(__linux__) && defined(__sparc__) +/* The SPARC definition of QEMU_VMALLOC_ALIGN needs SHMLBA */ +#include +#endif + #ifndef _WIN32 #include #else @@ -111,6 +120,10 @@ extern int daemon(int, int); #define WEXITSTATUS(x) (x) #endif =20 +#ifdef __APPLE__ +#include +#endif + #ifdef _WIN32 #include "sysemu/os-win32.h" #endif @@ -119,10 +132,6 @@ extern int daemon(int, int); #include "sysemu/os-posix.h" #endif =20 -#ifdef __APPLE__ -#include -#endif - #include "glib-compat.h" #include "qemu/typedefs.h" =20 @@ -459,7 +468,6 @@ void qemu_anon_ram_free(void *ptr, size_t size); /* Use 1 MiB (segment size) alignment so gmap can be used by KVM. */ # define QEMU_VMALLOC_ALIGN (256 * 4096) #elif defined(__linux__) && defined(__sparc__) -#include # define QEMU_VMALLOC_ALIGN MAX(qemu_real_host_page_size, SHMLBA) #else # define QEMU_VMALLOC_ALIGN qemu_real_host_page_size @@ -539,8 +547,6 @@ struct iovec { =20 ssize_t readv(int fd, const struct iovec *iov, int iov_cnt); ssize_t writev(int fd, const struct iovec *iov, int iov_cnt); -#else -#include #endif =20 #ifdef _WIN32 --=20 2.20.1