qemu-stable
[Top][All Lists]
Advanced

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

[Qemu-stable] [PATCH QEMU 1.0.1] virtio-9p-handle: define AT_EMPTY_PATH


From: Stefano Stabellini
Subject: [Qemu-stable] [PATCH QEMU 1.0.1] virtio-9p-handle: define AT_EMPTY_PATH if needed
Date: Thu, 21 Jun 2012 17:30:06 +0100
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

Hi all,
I am proposing the appended patch for QEMU 1.0 stable, it fixes
QEMU compilation on Ubuntu.
Upstream a different solution was taken (see
http://marc.info/?l=qemu-devel&m=133904755610143, that resulted in
commit acc55ba8b1519bda27be19fad50b65d2b0c7d26d), but it is not
applicable to QEMU 1.0.x.

- Stefano

---

From: Serge Hallyn <address@hidden>

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.

Signed-off-by: Serge Hallyn <address@hidden>

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




reply via email to

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