From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70834C433B4 for ; Sat, 17 Apr 2021 19:43:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E63E061210 for ; Sat, 17 Apr 2021 19:43:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E63E061210 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXqqg-0001CJ-On for qemu-devel@archiver.kernel.org; Sat, 17 Apr 2021 15:43:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXqpY-0007sk-5m for qemu-devel@nongnu.org; Sat, 17 Apr 2021 15:42:12 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:39646) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXqpW-0008Am-72 for qemu-devel@nongnu.org; Sat, 17 Apr 2021 15:42:11 -0400 Received: by mail-wm1-x32b.google.com with SMTP id i21-20020a05600c3555b029012eae2af5d4so6363754wmq.4 for ; Sat, 17 Apr 2021 12:42:09 -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=CuYAxYEssZGCHU2JHke0qyk/TAhFSaPXu7Y4rIDN+sw=; b=A+wQSu24ydbrfJnh5jM0fF2ovnGlvviStL3W0HPKJWQ3stKb6cX7t6wWTuNUjKdxjw vEAmbnSyqI5qdlhuwZAF0Vd8WGGi1uxEn6JPGkVlipHLeNT4eDxWE5nhIYtYj5Rcnh2t 62OrSFu5RJu+6Y0yLuGdeq5vt/QCzu1JmwNJHBWx48xL9WG6ntvKHCPfFMasObRtpubl yxVHw1csKAg3f+Nt/D+uPO7haLe/CnOQoDnmmjpkfMkOyUYjVeBcOzlQZ2V3yhatApzG gUL87d4TPTtV1ijoY6uF3o5/jm+MHS+1mEGKUzqAhxIPXoEtCtS3lh5j+eWg8Dzx/f6D wMlA== 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=CuYAxYEssZGCHU2JHke0qyk/TAhFSaPXu7Y4rIDN+sw=; b=bYyJRvHtyAtPIHIh9zkcOReFBGOGeubfKASPwMXULRuT5I7otTbV4cIsZHJ+sZ+R6o ZbpmlRlF983kah4/VdElm5COtuoke4+UqrKo9FvtT4AeAv7O4D3rdhg6A1RjlFw4gWI9 UvAYTS2NALqOHBK7NM/C73w+UnKmkYxqn8nIB5BIOR0aNJvj3dBN5SRKo6keXnjKC1Wr Aka/EMXM/aHv2/bmjTPDLWNSyoj2vm3osingypNcoL65jNMkrrCsD6WWgUi1oXYvBsCE hnWxuC5IusDYSzJVEPHs0a2LuhhzGjc0G2l0/UI+pXE0ZpI2qDP6bgZM4/Wl56QfYOP1 R7oQ== X-Gm-Message-State: AOAM530DCocApSLNC+af5GHjgQAEzcNu10+hKhMW3sbkfYiob5N97Kyi 2Qvvzh0Q7s8qBphmR8Rn+rPMoIz8IimmkbHd X-Google-Smtp-Source: ABdhPJz5EsYW7SEeTARx/HUM3iRWJmbqHSEIIEantLzguGvhvZODTqw0PcwWj5BOMfHjWULxszBlvQ== X-Received: by 2002:a7b:c444:: with SMTP id l4mr13941414wmi.36.1618688528631; Sat, 17 Apr 2021 12:42:08 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c12sm17304374wro.6.2021.04.17.12.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Apr 2021 12:42:08 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 1/7] osdep: include glib-compat.h before other QEMU headers Date: Sat, 17 Apr 2021 20:41:59 +0100 Message-Id: <20210417194205.17057-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210417194205.17057-1-peter.maydell@linaro.org> References: <20210417194205.17057-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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 , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini glib-compat.h is sort of like a system header, and it needs to include system headers (glib.h) that may dislike being included under 'extern "C"'. Move it right after all system headers and before all other QEMU headers. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Peter Maydell Acked-by: Paolo Bonzini Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20210416135543.20382-2-peter.maydell@linaro.org [PMM: Added comment about why glib-compat.h is special] Signed-off-by: Peter Maydell --- include/qemu/osdep.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index ba15be9c569..ab84ecc7c1c 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -111,6 +111,13 @@ extern int daemon(int, int); #define WEXITSTATUS(x) (x) #endif +/* + * This is somewhat like a system header; it must be outside any extern "C" + * block because it includes system headers itself, including glib.h, + * which will not compile if inside an extern "C" block. + */ +#include "glib-compat.h" + #ifdef _WIN32 #include "sysemu/os-win32.h" #endif @@ -123,7 +130,6 @@ extern int daemon(int, int); #include #endif -#include "glib-compat.h" #include "qemu/typedefs.h" /* -- 2.20.1