Skip to contentSkip to conversation

qemu-timer.c: Trim list of included headers

PATCH In review Peter Maydell 2 participants 3 messages Jan 20, 2015 – Jan 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-timer.c: Trim list of included headers

qemu-timer.c was including a lot more headers than it needed to, presumably for historical reasons. In particular, it included ui/console.h; this now tries to pull in <pixman.h>, which will cause a compilation failure in --disable-tools --disable-system configurations when running "make check" (which builds qemu-timer.c, even though the linux-user binaries themselves don't need it).

Fix this build failure by trimming down the set of included headers severely -- we only really need main-loop.h and timer.h.

---
I'm not sure exactly when this broke -- it's not a config I run as part of pullreq processing.

 qemu-timer.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
qemu-timer.c +2 -6
index 98d9d1b..a77fb47 100644
@@ -22,13 +22,9 @@
  * THE SOFTWARE.
  */
 
-#include "sysemu/sysemu.h"
-#include "monitor/monitor.h"
-#include "ui/console.h"
-
-#include "hw/hw.h"
-
+#include "qemu/main-loop.h"
 #include "qemu/timer.h"
+
 #ifdef CONFIG_POSIX
 #include <pthread.h>
 #endif
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 29 lines · Peter Maydell

qemu-timer.c was including a lot more headers than it needed to, presumably for historical reasons. In particular, it included ui/console.h; this now tries to pull in <pixman.h>, which will cause a compilation failure in --disable-tools --disable-system configurations when running "make check" (which builds qemu-timer.c, even though the linux-user binaries themselves don't need it).

Fix this build failure by trimming down the set of included headers severely -- we only really need main-loop.h and timer.h.

---
I'm not sure exactly when this broke -- it's not a config I run as part of pullreq processing.

 qemu-timer.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
qemu-timer.c +0 -2
index 98d9d1b..a77fb47 100644
@@ -22,13 +22,9 @@
  * THE SOFTWARE.
  */
 
-#include "sysemu/sysemu.h"
-#include "monitor/monitor.h"

qemu-timer.c line 30

Quoted 10 lines
qemu-timer.c +2 -4
-#include "ui/console.h"
-
-#include "hw/hw.h"
-
+#include "qemu/main-loop.h"
 #include "qemu/timer.h"
+
 #ifdef CONFIG_POSIX
 #include <pthread.h>
 #endif
#2 lore raw
Quoted 10 lines · Paolo Bonzini
Quoted 7 lines · Peter Maydell

qemu-timer.c was including a lot more headers than it needed to, presumably for historical reasons. In particular, it included ui/console.h; this now tries to pull in <pixman.h>, which will cause a compilation failure in --disable-tools --disable-system configurations when running "make check" (which builds qemu-timer.c, even though the linux-user binaries themselves don't need it).

Quoted 6 lines
Quoted 4 lines

Fix this build failure by trimming down the set of included headers severely -- we only really need main-loop.h and timer.h.

Thanks; applied to master as a buildfix.

-- PMM