[Top][All Lists]

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

[Qemu-trivial] [PATCH for-2.7] virtio-gpu: fix missing log.h include fil

From: Daniel P. Berrange
Subject: [Qemu-trivial] [PATCH for-2.7] virtio-gpu: fix missing log.h include file
Date: Mon, 8 Aug 2016 10:31:40 +0100

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: In function 
/home/berrange/src/virt/qemu/include/hw/virtio/virtio-gpu.h:138:13: error: 
implicit declaration of function ‘qemu_log_mask’ 
             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’
/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/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 <address@hidden>
 include/hw/virtio/virtio-gpu.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index e4f424a..20d1cd6 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -19,6 +19,7 @@
 #include "ui/console.h"
 #include "hw/virtio/virtio.h"
 #include "hw/pci/pci.h"
+#include "qemu/log.h"
 #include "standard-headers/linux/virtio_gpu.h"
 #define TYPE_VIRTIO_GPU "virtio-gpu-device"

reply via email to

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