Serge Hallyn <serge.hal...@canonical.com> 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 <serge.hal...@canonical.com> > --- > 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