[4/4] qemu/log.h: Fix missing includes

Submitted by Peter Crosthwaite on Jan. 26, 2013, 8:54 p.m.

Details

Message ID 79b3ee1c-5db5-47e7-a458-39e5c0698e3f@VA3EHSMHS027.ehs.local
State New
Headers show

Commit Message

Peter Crosthwaite Jan. 26, 2013, 8:54 p.m.
qemu/log.h needs a few bits and pieces from qemu-common to compile.
Fixes the case where qemu/log.h is the first files included.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
 include/qemu/log.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Igor Mammedov Jan. 28, 2013, 10:55 a.m.
On Sat, 26 Jan 2013 12:54:36 -0800
Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:

> qemu/log.h needs a few bits and pieces from qemu-common to compile.
> Fixes the case where qemu/log.h is the first files included.
> 
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
>  include/qemu/log.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/qemu/log.h b/include/qemu/log.h
> index 58f69cb..0a1266d 100644
> --- a/include/qemu/log.h
> +++ b/include/qemu/log.h
> @@ -2,6 +2,7 @@
>  #define QEMU_LOG_H
>  
>  #include <stdarg.h>
> +#include "qemu-common.h"
Could you try to avoid including it header, and instead of move whatever
definitions it depends on to their proper places?
Reasoning for not including it in other headers, that it often creates circular
header dependencies of header that includes it is included in another header.

>  #ifdef NEED_CPU_H
>  #include "disas/disas.h"
>  #endif
> -- 
> 1.7.12.1.396.g16eed7c
> 
> 
>

Patch hide | download patch | download mbox

diff --git a/include/qemu/log.h b/include/qemu/log.h
index 58f69cb..0a1266d 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -2,6 +2,7 @@ 
 #define QEMU_LOG_H
 
 #include <stdarg.h>
+#include "qemu-common.h"
 #ifdef NEED_CPU_H
 #include "disas/disas.h"
 #endif