diff mbox series

[1/2] osdep: include glib-compat.h before other QEMU headers

Message ID 20210413113741.214867-2-pbonzini@redhat.com (mailing list archive)
State New
Headers show
Series osdep: allow including qemu/osdep.h outside extern "C" | expand

Commit Message

Paolo Bonzini April 13, 2021, 11:37 a.m. UTC
glib-compat.h is sort of like a system header, and it needs to include
system headers (glib.h) that may dislike being included under
'extern "C"'.  Move it right after all system headers and before
all other QEMU headers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
 include/qemu/osdep.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index ba15be9c56..b67b0a1e8c 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -111,6 +111,8 @@  extern int daemon(int, int);
 #define WEXITSTATUS(x) (x)
+#include "glib-compat.h"
 #ifdef _WIN32
 #include "sysemu/os-win32.h"
@@ -123,7 +125,6 @@  extern int daemon(int, int);
 #include <AvailabilityMacros.h>
-#include "glib-compat.h"
 #include "qemu/typedefs.h"