• Hidetoshi Seto's avatar
    virtio-9p: fix build on !CONFIG_UTIMENSAT · 38671423
    Hidetoshi Seto authored
    This patch introduce a fallback mechanism for old systems that do not
    support utimensat().  This fix build failure with following warnings:
    
    hw/virtio-9p-local.c: In function 'local_utimensat':
    hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat'
    hw/virtio-9p-local.c:479: warning: nested extern declaration of 'utimensat'
    
    and:
    
    hw/virtio-9p.c: In function 'v9fs_setattr_post_chmod':
    hw/virtio-9p.c:1410: error: 'UTIME_NOW' undeclared (first use in this function)
    hw/virtio-9p.c:1410: error: (Each undeclared identifier is reported only once
    hw/virtio-9p.c:1410: error: for each function it appears in.)
    hw/virtio-9p.c:1413: error: 'UTIME_OMIT' undeclared (first use in this function)
    hw/virtio-9p.c: In function 'v9fs_wstat_post_chmod':
    hw/virtio-9p.c:2905: error: 'UTIME_OMIT' undeclared (first use in this function)
    
    [NOTE: At this time virtio-9p is only user of utimensat(), and is available
           only when host is linux and CONFIG_VIRTFS is defined.  So there are
           no similar warning for win32.  Please provide a wrapper for win32 in
           oslib-win32.c if new user really requires it.]
    
    v5:
      - Allow fallback on runtime
      - Move qemu_utimensat() to oslib-posix.c
      - Rebased on latest qemu.git
    v4:
      - Use tv_now.tv_usec
    v3:
      - Use better alternative handling for UTIME_NOW/OMIT
      - Move qemu_utimensat() to cutils.c
    V2:
      - Introduce qemu_utimensat()
    Acked-by: default avatarChris Wright <chrisw@sous-sol.org>
    Acked-by: default avatarM. Mohan Kumar <mohan@in.ibm.com>
    Acked-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
    Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Signed-off-by: default avatarVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
    38671423
Name
Last commit
Last update
QMP Loading commit data...
audio Loading commit data...
block Loading commit data...
bsd-user Loading commit data...
darwin-user Loading commit data...
default-configs Loading commit data...
docs Loading commit data...
fpu Loading commit data...
fsdev Loading commit data...
gdb-xml Loading commit data...
hw Loading commit data...
linux-user Loading commit data...
net Loading commit data...
pc-bios Loading commit data...
roms Loading commit data...
slirp Loading commit data...
sysconfigs/target Loading commit data...
target-alpha Loading commit data...
target-arm Loading commit data...
target-cris Loading commit data...
target-i386 Loading commit data...
target-m68k Loading commit data...
target-microblaze Loading commit data...
target-mips Loading commit data...
target-ppc Loading commit data...
target-s390x Loading commit data...
target-sh4 Loading commit data...
target-sparc Loading commit data...
tcg Loading commit data...
tests Loading commit data...
ui Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
CODING_STYLE Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Changelog Loading commit data...
HACKING Loading commit data...
LICENSE Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
Makefile.dis Loading commit data...
Makefile.hw Loading commit data...
Makefile.objs Loading commit data...
Makefile.target Loading commit data...
Makefile.user Loading commit data...
README Loading commit data...
TODO Loading commit data...
VERSION Loading commit data...
a.out.h Loading commit data...
acl.c Loading commit data...
acl.h Loading commit data...
aes.c Loading commit data...
aes.h Loading commit data...
aio.c Loading commit data...
alpha-dis.c Loading commit data...
alpha.ld Loading commit data...
arch_init.c Loading commit data...
arch_init.h Loading commit data...
arm-dis.c Loading commit data...
arm-semi.c Loading commit data...
arm.ld Loading commit data...
async.c Loading commit data...
balloon.c Loading commit data...
balloon.h Loading commit data...
block-migration.c Loading commit data...
block-migration.h Loading commit data...
block.c Loading commit data...
block.h Loading commit data...
block_int.h Loading commit data...
blockdev.c Loading commit data...
blockdev.h Loading commit data...
bswap.h Loading commit data...
bt-host.c Loading commit data...
bt-host.h Loading commit data...
bt-vhci.c Loading commit data...
buffered_file.c Loading commit data...
buffered_file.h Loading commit data...
cache-utils.c Loading commit data...
cache-utils.h Loading commit data...
check-qdict.c Loading commit data...
check-qfloat.c Loading commit data...
check-qint.c Loading commit data...
check-qjson.c Loading commit data...
check-qlist.c Loading commit data...
check-qstring.c Loading commit data...
cmd.c Loading commit data...
cmd.h Loading commit data...
compatfd.c Loading commit data...
compatfd.h Loading commit data...
config.h Loading commit data...
configure Loading commit data...
console.c Loading commit data...
console.h Loading commit data...
cpu-all.h Loading commit data...
cpu-common.h Loading commit data...
cpu-defs.h Loading commit data...
cpu-exec.c Loading commit data...
cpus.c Loading commit data...
cpus.h Loading commit data...
create_config Loading commit data...
cris-dis.c Loading commit data...
cursor.c Loading commit data...
cursor_hidden.xpm Loading commit data...
cursor_left_ptr.xpm Loading commit data...
cutils.c Loading commit data...
def-helper.h Loading commit data...
device_tree.c Loading commit data...
device_tree.h Loading commit data...
dis-asm.h Loading commit data...
disas.c Loading commit data...
disas.h Loading commit data...
dma-helpers.c Loading commit data...
dma.h Loading commit data...
dyngen-exec.h Loading commit data...
elf.h Loading commit data...
envlist.c Loading commit data...
envlist.h Loading commit data...
exec-all.h Loading commit data...
exec.c Loading commit data...
feature_to_c.sh Loading commit data...
gdbstub.c Loading commit data...
gdbstub.h Loading commit data...
gen-icount.h Loading commit data...
hmp-commands.hx Loading commit data...
host-utils.c Loading commit data...
host-utils.h Loading commit data...
hpet.h Loading commit data...
hppa-dis.c Loading commit data...
hppa.ld Loading commit data...
hxtool Loading commit data...
i386-dis.c Loading commit data...
i386.ld Loading commit data...
ia64-dis.c Loading commit data...
ia64.ld Loading commit data...
input.c Loading commit data...
ioport-user.c Loading commit data...
ioport.c Loading commit data...
ioport.h Loading commit data...
iorange.h Loading commit data...
iov.c Loading commit data...
iov.h Loading commit data...
json-lexer.c Loading commit data...
json-lexer.h Loading commit data...
json-parser.c Loading commit data...
json-parser.h Loading commit data...
json-streamer.c Loading commit data...
json-streamer.h Loading commit data...
kvm-all.c Loading commit data...
kvm-stub.c Loading commit data...
kvm.h Loading commit data...
libfdt_env.h Loading commit data...
linux-aio.c Loading commit data...
m68k-dis.c Loading commit data...
m68k-semi.c Loading commit data...
m68k.ld Loading commit data...
make_device_config.sh Loading commit data...
microblaze-dis.c Loading commit data...
migration-exec.c Loading commit data...
migration-fd.c Loading commit data...
migration-tcp.c Loading commit data...
migration-unix.c Loading commit data...
migration.c Loading commit data...
migration.h Loading commit data...
mips-dis.c Loading commit data...
mips.ld Loading commit data...
module.c Loading commit data...
module.h Loading commit data...
monitor.c Loading commit data...
monitor.h Loading commit data...
nbd.c Loading commit data...
nbd.h Loading commit data...
net-checksum.c Loading commit data...
net.c Loading commit data...
net.h Loading commit data...
notify.c Loading commit data...
notify.h Loading commit data...
os-posix.c Loading commit data...
os-win32.c Loading commit data...
osdep.c Loading commit data...
osdep.h Loading commit data...
oslib-posix.c Loading commit data...
oslib-win32.c Loading commit data...
path.c Loading commit data...
pci-ids.txt Loading commit data...
pflib.c Loading commit data...
pflib.h Loading commit data...
poison.h Loading commit data...
posix-aio-compat.c Loading commit data...
ppc-dis.c Loading commit data...
ppc.ld Loading commit data...
ppc64.ld Loading commit data...
qbool.c Loading commit data...
qbool.h Loading commit data...
qdict-test-data.txt Loading commit data...
qdict.c Loading commit data...
qdict.h Loading commit data...
qemu-aio.h Loading commit data...
qemu-barrier.h Loading commit data...
qemu-binfmt-conf.sh Loading commit data...
qemu-char.c Loading commit data...
qemu-char.h Loading commit data...
qemu-common.h Loading commit data...
qemu-config.c Loading commit data...
qemu-config.h Loading commit data...
qemu-doc.texi Loading commit data...
qemu-error.c Loading commit data...
qemu-error.h Loading commit data...
qemu-img-cmds.hx Loading commit data...
qemu-img.c Loading commit data...
qemu-img.texi Loading commit data...
qemu-io.c Loading commit data...
qemu-lock.h Loading commit data...
qemu-log.h Loading commit data...
qemu-malloc.c Loading commit data...
qemu-nbd.c Loading commit data...
qemu-nbd.texi Loading commit data...
qemu-objects.h Loading commit data...
qemu-option.c Loading commit data...
qemu-option.h Loading commit data...
qemu-options.h Loading commit data...
qemu-options.hx Loading commit data...
qemu-os-posix.h Loading commit data...
qemu-os-win32.h Loading commit data...
qemu-queue.h Loading commit data...
qemu-sockets.c Loading commit data...
qemu-tech.texi Loading commit data...
qemu-thread.c Loading commit data...
qemu-thread.h Loading commit data...
qemu-timer-common.c Loading commit data...
qemu-timer.c Loading commit data...
qemu-timer.h Loading commit data...
qemu-tool.c Loading commit data...
qemu-x509.h Loading commit data...
qemu.sasl Loading commit data...
qemu_socket.h Loading commit data...
qerror.c Loading commit data...
qerror.h Loading commit data...
qfloat.c Loading commit data...
qfloat.h Loading commit data...
qint.c Loading commit data...
qint.h Loading commit data...
qjson.c Loading commit data...
qjson.h Loading commit data...
qlist.c Loading commit data...
qlist.h Loading commit data...
qmp-commands.hx Loading commit data...
qobject.h Loading commit data...
qstring.c Loading commit data...
qstring.h Loading commit data...
range.h Loading commit data...
readline.c Loading commit data...
readline.h Loading commit data...
rules.mak Loading commit data...
rwhandler.c Loading commit data...
rwhandler.h Loading commit data...
s390-dis.c Loading commit data...
s390.ld Loading commit data...
savevm.c Loading commit data...
sh4-dis.c Loading commit data...
simpletrace.c Loading commit data...
simpletrace.h Loading commit data...
simpletrace.py Loading commit data...
softmmu-semi.h Loading commit data...
softmmu_defs.h Loading commit data...
softmmu_exec.h Loading commit data...
softmmu_header.h Loading commit data...
softmmu_template.h Loading commit data...
sparc-dis.c Loading commit data...
sparc.ld Loading commit data...
sparc64.ld Loading commit data...
sysemu.h Loading commit data...
targphys.h Loading commit data...
tcg-runtime.c Loading commit data...
texi2pod.pl Loading commit data...
thunk.c Loading commit data...
thunk.h Loading commit data...
trace-events Loading commit data...
tracetool Loading commit data...
translate-all.c Loading commit data...
uboot_image.h Loading commit data...
usb-bsd.c Loading commit data...
usb-linux.c Loading commit data...
usb-stub.c Loading commit data...
version.rc Loading commit data...
vgafont.h Loading commit data...
vl.c Loading commit data...
x86_64.ld Loading commit data...