From: david.vrabel@citrix•com (David Vrabel)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation in userspace
Date: Thu, 15 Oct 2015 11:29:12 +0100 [thread overview]
Message-ID: <561F7FF8.9030703@citrix.com> (raw)
In-Reply-To: <1444888618-4506-76-git-send-email-mikko.rapeli@iki.fi>
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 <andrew.cooper3@citrix•com> 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 <linux/types.h>
> #include <linux/compiler.h>
> -#include <xen/interface/xen.h>
> +
> +/* 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
next prev parent reply other threads:[~2015-10-15 10:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1444888618-4506-1-git-send-email-mikko.rapeli@iki.fi>
2015-10-15 5:55 ` [PATCH v4 05/79] exynos_drm.h: use __u64 from linux/types.h Mikko Rapeli
2015-10-15 16:17 ` Gustavo Padovan
2015-10-15 5:56 ` [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation in userspace Mikko Rapeli
2015-10-15 10:07 ` kbuild test robot
2015-10-15 10:29 ` David Vrabel [this message]
2015-10-15 11:18 ` Mikko Rapeli
2015-10-15 11:24 ` David Vrabel
2015-10-15 11:35 ` Mikko Rapeli
2015-10-15 5:56 ` [PATCH v4 79/79] arch/arm/include/uapi/asm/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561F7FF8.9030703@citrix.com \
--to=david.vrabel@citrix$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox