[Qemu-devel] [PATCH] hw/i386/vmport: fix missing definitions with x86_64-w64-mingw32

Laurent Vivier posted 1 patch 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171221211103.30311-1-laurent@vivier.eu
Test checkpatch passed
Test docker passed
Test ppc passed
Test s390x passed
hw/i386/vmport.c | 1 +
1 file changed, 1 insertion(+)
[Qemu-devel] [PATCH] hw/i386/vmport: fix missing definitions with x86_64-w64-mingw32
Posted by Laurent Vivier 6 years, 3 months ago
When compiled with x86_64-w64-mingw32, we have:

   error: implicit declaration of function 'qemu_log_mask'
   error: 'LOG_UNIMP' undeclared (first use in this function)

This patch adds the missing include.

Fixes: 7299e1a411
       ("hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP")
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/i386/vmport.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 9b8c68806e..116aa09819 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -27,6 +27,7 @@
 #include "hw/i386/pc.h"
 #include "sysemu/hw_accel.h"
 #include "hw/qdev.h"
+#include "qemu/log.h"
 #include "trace.h"
 
 #define VMPORT_CMD_GETVERSION 0x0a
-- 
2.14.3


Re: [Qemu-devel] [PATCH] hw/i386/vmport: fix missing definitions with x86_64-w64-mingw32
Posted by Peter Maydell 6 years, 3 months ago
On 21 December 2017 at 21:11, Laurent Vivier <laurent@vivier.eu> wrote:
> When compiled with x86_64-w64-mingw32, we have:
>
>    error: implicit declaration of function 'qemu_log_mask'
>    error: 'LOG_UNIMP' undeclared (first use in this function)
>
> This patch adds the missing include.
>
> Fixes: 7299e1a411
>        ("hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP")
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>

Looks to me like it'll be a bug for anything not configured
using the 'log' trace backend, rather than win32 specific.

I'll apply (and fix up the commit message).

thanks
-- PMM

Re: [Qemu-devel] [PATCH] hw/i386/vmport: fix missing definitions with x86_64-w64-mingw32
Posted by Philippe Mathieu-Daudé 6 years, 3 months ago
>> Fixes: 7299e1a411
>>        ("hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP")
>> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
>
> Looks to me like it'll be a bug for anything not configured
> using the 'log' trace backend, rather than win32 specific.

Sorry my bad, it seems I don't test enough lately, I'll try to do more
testing, and somehow to reduce CI build time, more they last, less we
rely on it, even with personal repositories.

Re: [Qemu-devel] [PATCH] hw/i386/vmport: fix missing definitions with x86_64-w64-mingw32
Posted by Peter Maydell 6 years, 3 months ago
On 21 December 2017 at 22:55, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>> Fixes: 7299e1a411
>>>        ("hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP")
>>> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
>>
>> Looks to me like it'll be a bug for anything not configured
>> using the 'log' trace backend, rather than win32 specific.
>
> Sorry my bad, it seems I don't test enough lately, I'll try to do more
> testing, and somehow to reduce CI build time, more they last, less we
> rely on it, even with personal repositories.

It's unfortunate that trace.h pulls in qemu/log.h if you're
using the log backend, because it makes this particular
mistake easy; we've had quite a few instances of it...
(I could probably configure one of my test setups with a
different trace backend which would at least catch these
before they hit master.)

thanks
-- PMM