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=-11.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 2D5C1C4727D for ; Thu, 24 Sep 2020 20:24:19 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 D35DD239EC for ; Thu, 24 Sep 2020 20:24:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="UxvoI45W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D35DD239EC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kLXmh-0005PO-78; Thu, 24 Sep 2020 20:24:07 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kLXmg-0005PJ-9e for xen-devel@lists.xenproject.org; Thu, 24 Sep 2020 20:24:06 +0000 X-Inumbo-ID: e20569de-928a-4ff0-98be-3e5fe2d73d64 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e20569de-928a-4ff0-98be-3e5fe2d73d64; Thu, 24 Sep 2020 20:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1600979043; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=vrsUMuCSqi23XJ0Xy09Z0CHs3L8+lcfKCfX6//biWKg=; b=UxvoI45WGSIzH679qNJErYA9AKIydWtoYMr3lDCztcd+DV6tqDBzH0eE a2kPp6TtoKxDLgKIoXHNJMCwHnrFWctlP0PVPJAwiZ8y0ZC8KINs8zcp1 Ss1gQh59T36J91sEEi4OqOb2VJ51o1hZOPeHA/oTxxb0HuIr8EtN71O/C w=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: B7VWk2xeSsxvj4f/e1LuDpnX7K5nwfgh2hcZXE7L5VVb78gJYpyKLyajyWmjPo0/FvoVXUlJ8y EPOi0BX8wSNOZHu7KXZSz31i3eNtbup1f4dHA2v8fpn/cdSXlMUyBo3YGi7rCTaJK6/07xQIfY NbWT2+JQZaG/AxXc7Cyzts6IjBxIqaageRtd3VjuBwdUGo0nzJZfE5raa6OpuVzf1yN6KkKm3r Sa3SwKiKJb3febIDaRIsQ7g1gXiKA0P9/j5MQwTWkEwyAyzI5b8hYUaV45nxhPKa4HawomMorc JyQ= X-SBRS: None X-MesageID: 28526152 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,299,1596513600"; d="scan'208";a="28526152" Subject: Re: [PATCH] tools/libs/guest: fix out of tree builds of libxenguest users To: Juergen Gross , CC: Ian Jackson , Wei Liu References: <20200923052401.24917-1-jgross@suse.com> From: Andrew Cooper Message-ID: Date: Thu, 24 Sep 2020 21:23:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200923052401.24917-1-jgross@suse.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To FTLPEX02CL05.citrite.net (10.13.108.178) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 23/09/2020 06:24, Juergen Gross wrote: > xenguest.h includes xenctrl_dom.h, which is including the Xen internal > xen/libelf/libelf.h. This results in build failures for components > using libxenguest when being built outside the Xen build environment. > > Fix that by guarding the include of xenctrl_dom.h with > "#ifdef __XEN_TOOLS_". > > Fixes: 7e0165c19387 ("tools/libxc: untangle libxenctrl from libxenguest") > Reported-by: Andrew Cooper > Signed-off-by: Juergen Gross > --- > tools/libs/guest/include/xenguest.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/libs/guest/include/xenguest.h b/tools/libs/guest/include/xenguest.h > index 4643384790..5cd502f644 100644 > --- a/tools/libs/guest/include/xenguest.h > +++ b/tools/libs/guest/include/xenguest.h > @@ -22,7 +22,9 @@ > #ifndef XENGUEST_H > #define XENGUEST_H > > +#ifdef __XEN_TOOLS__ > #include > +#endif I have to admit that this doesn't feel right to put into a public header. Can't we split xenctrl_dom in half and merge the relevant subsets into xen{ctrl,guest}.h ? ~Andrew