From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752717AbbJOK3R (ORCPT ); Thu, 15 Oct 2015 06:29:17 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:39239 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbbJOK3Q (ORCPT ); Thu, 15 Oct 2015 06:29:16 -0400 X-IronPort-AV: E=Sophos;i="5.17,684,1437436800"; d="scan'208";a="310539057" Message-ID: <561F7FF8.9030703@citrix.com> Date: Thu, 15 Oct 2015 11:29:12 +0100 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Mikko Rapeli , CC: Stefano Stabellini , Russell King , Konrad Rzeszutek Wilk , Boris Ostrovsky , , , Subject: Re: [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation in userspace References: <1444888618-4506-1-git-send-email-mikko.rapeli@iki.fi> <1444888618-4506-76-git-send-email-mikko.rapeli@iki.fi> In-Reply-To: <1444888618-4506-76-git-send-email-mikko.rapeli@iki.fi> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/10/15 06:56, Mikko Rapeli wrote: > xen/interface/xen.h is not exported from kernel headers so remove the > dependency and provide needed defines for domid_t and xen_pfn_t if they > are not already defined by some other e.g. Xen specific headers. > > Suggested by Andrew Cooper on lkml message > <5569F9C9.8000607@citrix.com>. > > The ifdef for ARM is ugly but did not find better solutions for it. > > Fixes userspace compilation error: > > xen/privcmd.h:38:31: fatal error: xen/interface/xen.h: No such file or directory [...] > --- a/include/uapi/xen/privcmd.h > +++ b/include/uapi/xen/privcmd.h > @@ -35,7 +35,19 @@ > > #include > #include > -#include > + > +/* Might be defined by Xen specific headers, but if not */ > +#ifndef domid_t > +typedef __u16 domid_t; > +#endif /* domid_t */ As the kbuild bot points out, this does not work since the existence of a typedef cannot be checked with #ifdef. I'm not really sure what problem you're trying to solve. A user space program making use of this interface gets the domid_t and xen_pfn_t etc typedefs from the headers provided as part of the libxenctrl library. David