From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScKZP-0004QB-Ny for qemu-devel@nongnu.org; Wed, 06 Jun 2012 14:03:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScKZM-0007WH-ER for qemu-devel@nongnu.org; Wed, 06 Jun 2012 14:02:59 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:60327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScKZM-0007W9-9D for qemu-devel@nongnu.org; Wed, 06 Jun 2012 14:02:56 -0400 Date: Wed, 6 Jun 2012 13:02:50 -0500 From: Serge Hallyn Message-ID: <20120606180250.GA10060@sergelap> References: <20120224195143.GA16353@vostro.hallyn.com> <877gvknxen.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <877gvknxen.fsf@skywalker.in.ibm.com> Subject: Re: [Qemu-devel] [PATCH] virtio-9p-handle: define AT_EMPTY_PATH if needed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K.V" Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Quoting Aneesh Kumar K.V (aneesh.kumar@linux.vnet.ibm.com): > Serge Hallyn 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 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 ? I don't think so. I got these awhile ago as well. The libc and linux headers simply don't seem to be compatible. > > > > Signed-off-by: Serge Hallyn > > --- > > 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 >