Patchwork [2/3] qemu-log: Allow usage in libhw

login
register
mail settings
Submitter Andreas Färber
Date June 9, 2012, 1:54 a.m.
Message ID <1339206871-4706-3-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/163880/
State New
Headers show

Comments

Andreas Färber - June 9, 2012, 1:54 a.m.
Add #ifdef to avoid complaint about use of poisoned "env".

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 qemu-log.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/qemu-log.h b/qemu-log.h
index fccfb110..a9b3ca4 100644
--- a/qemu-log.h
+++ b/qemu-log.h
@@ -50,6 +50,7 @@  extern int loglevel;
 
 /* Special cases: */
 
+#ifdef NEED_CPU_H
 /* cpu_dump_state() logging functions: */
 #define log_cpu_state(env, f) cpu_dump_state((env), logfile, fprintf, (f));
 #define log_cpu_state_mask(b, env, f) do {           \
@@ -64,6 +65,7 @@  extern int loglevel;
 
 /* page_dump() output to the log file: */
 #define log_page_dump() page_dump(logfile)
+#endif