qemu-e2k/include/hw/virtio
Daniel P. Berrange 8afc224ffe virtio-gpu: fix missing log.h include file
The virtio-gpu.h file defines a macro VIRTIO_GPU_FILL_CMD
which includes a call to qemu_log_mask, but does not
include qemu/log.h. In a default configure, it is lucky
and gets qemu/log.h indirectly due to the 'log' trace
backend being enabled. If that trace backend is disabled
though, eg

 ./configure --enable-trace-backends=nop

Then the build will fail:

In file included from /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:19:0:
/home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c: In function ‘virgl_cmd_create_resource_2d’:
/home/berrange/src/virt/qemu/include/hw/virtio/virtio-gpu.h:138:13: error: implicit declaration of function ‘qemu_log_mask’ [-Werror=implicit-function-declaration]
             qemu_log_mask(LOG_GUEST_ERROR,                              \
             ^
/home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:34:5: note: in expansion of macro ‘VIRTIO_GPU_FILL_CMD’
     VIRTIO_GPU_FILL_CMD(c2d);
     ^~~~~~~~~~~~~~~~~~~
/home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:34:5: error: nested extern declaration of ‘qemu_log_mask’ [-Werror=nested-externs]
In file included from /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:19:0:
/home/berrange/src/virt/qemu/include/hw/virtio/virtio-gpu.h:138:27: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)
             qemu_log_mask(LOG_GUEST_ERROR,                              \

[snip many more errors]

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1470648700-3474-1-git-send-email-berrange@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-08-16 11:21:31 +01:00
..
vhost-backend.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
vhost-scsi.h vhost-scsi: include linux/vhost.h 2015-09-25 12:04:41 +02:00
vhost.h vhost: add vhost_net_set_backend() 2016-07-29 00:33:49 +03:00
virtio-access.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-balloon.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-blk.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-bus.h virtio-bus: remove old set_host_notifier callback 2016-06-24 08:47:35 +03:00
virtio-gpu.h virtio-gpu: fix missing log.h include file 2016-08-16 11:21:31 +01:00
virtio-input.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-net.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-rng.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-scsi.h virtio-scsi: Replace HandleOutput typedef 2016-07-21 20:44:19 +03:00
virtio-serial.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio.h virtio: Migration helper function and macro 2016-07-21 20:44:19 +03:00