CC libhw64/9pfs/virtio-9p-handle.o
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_update_file_cred’:
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c:70:58: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c:70:58: note: each undeclared identifier is reported only once for each function it appears in
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_lstat’:
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c:87:34: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_symlink’:
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c:314:62: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_link’:
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c:337:45: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_chown’:
/usr/src/qemu-kvm-1.0.1/hw/9pfs/virtio-9p-handle.c:373:58: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
make[1]: *** [9pfs/virtio-9p-handle.o] Error 1
make: *** [subdir-libhw64] Error 2
It compiled okay on 11.04.
The bug is actually in libc (see bug 1010069). You can work around it using the same patch we are using in the ubuntu package, define_ AT_EMPTY_ PATH.patch. It probably won't apply cleanly upstream, but just make sure to add
#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
near the top of hw/9pfs/ virtio- 9p-handle. c