qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-9p-handle: define AT_EMPTY_PATH if neede


From: Aneesh Kumar K.V
Subject: Re: [Qemu-devel] [PATCH] virtio-9p-handle: define AT_EMPTY_PATH if needed
Date: Wed, 06 Jun 2012 23:19:20 +0530

Serge Hallyn <address@hidden> writes:

> If AT_EMPTY_PATH is not in one of the included files, go ahead and
> define it.  qemu won't compile on ubuntu for me without this.
>
> (Note - alternatively we could #include <linux/fcntl.h> to pick
> up the definitions there)

Then why don't we do that ? I do get the below errors

In file included from /usr/include/x86_64-linux-gnu/asm/fcntl.h:1:0,
                 from /usr/include/linux/fcntl.h:4,
                 from 
/home/opensource/sources/qemu/qemu-upstream/hw/9pfs/virtio-9p-handle.c:28:
/usr/include/asm-generic/fcntl.h:127:8: error: redefinition of ‘struct 
f_owner_ex’
/usr/include/x86_64-linux-gnu/bits/fcntl.h:204:8: note: originally defined here
In file included from /usr/include/x86_64-linux-gnu/asm/fcntl.h:1:0,
                 from /usr/include/linux/fcntl.h:4,

Are they do to ubuntu multi-arch changes ? 

>
> Signed-off-by: Serge Hallyn <address@hidden>
> ---
>  hw/9pfs/virtio-9p-handle.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c
> index f96d17a..e403a84 100644
> --- a/hw/9pfs/virtio-9p-handle.c
> +++ b/hw/9pfs/virtio-9p-handle.c
> @@ -39,6 +39,15 @@
>  #ifndef BTRFS_SUPER_MAGIC
>  #define BTRFS_SUPER_MAGIC 0x9123683E
>  #endif
> +#ifndef AT_REMOVEDIR
> +#define AT_REMOVEDIR    0x200
> +#endif
> +#ifndef AT_EMPTY_PATH
> +#define AT_EMPTY_PATH   0x1000  /* Allow empty relative pathname */
> +#endif
> +#ifndef O_PATH
> +#define O_PATH    010000000
> +#endif
>
>  struct handle_data {
>      int mountfd;
> -- 
> 1.7.9

-aneesh




reply via email to

[Prev in Thread] Current Thread [Next in Thread]