Skip to content

osdep: allow including qemu/osdep.h outside extern "C"

Paolo Bonzini qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2osdep: include glib-compat.h before other QEMU headersinclude/qemu/osdep.h+2 -10 replies
2/2osdep: protect qemu/osdep.h with extern "C"disas/nanomips.cpp include/qemu/compiler.h include/qemu/osdep.h+16 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] osdep: allow including qemu/osdep.h outside extern "C"

qemu/osdep.h is quite special in that, despite being part of QEMU sources, it is included by C++ source files as well.

disas/nanomips.cpp is doing so within an 'extern "C"' block, which breaks with latest glib due to the inclusion of templates in glib.h.

These patches implement Daniel Berrangé's idea of pushing the 'extern "C"' block within glib.h and including system headers (including glib.h, and in fact QEMU's own glib-compat.h too) *outside* the block.

(CI has not finished running yet, but it seems encouraging).

Paolo

Paolo Bonzini (2):
osdep: include glib-compat.h before other QEMU headers
osdep: protect qemu/osdep.h with extern "C"

 disas/nanomips.cpp      |  2 +-
 include/qemu/compiler.h |  6 ++++++
 include/qemu/osdep.h    | 13 +++++++++++--
 3 files changed, 18 insertions(+), 3 deletions(-)
Signature · 1 line
2.30.1