[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL v2 1/3] osdep: include glib-compat.h before other QEMU headers
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PULL v2 1/3] osdep: include glib-compat.h before other QEMU headers |
Date: |
Wed, 14 Apr 2021 18:51:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 4/13/21 6:08 PM, Paolo Bonzini wrote:
> 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 --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)
> #endif
>
Maybe worth a comment "must be after system headers and before other
QEMU headers" so we don't move it again by mistake.
> +#include "glib-compat.h"
> +
> #ifdef _WIN32
> #include "sysemu/os-win32.h"
> #endif
> @@ -123,7 +125,6 @@ extern int daemon(int, int);
> #include <AvailabilityMacros.h>
> #endif
>
> -#include "glib-compat.h"
> #include "qemu/typedefs.h"
>
> /*
>
- [PULL v2 0/3] osdep.h + QOM changes for QEMU 6.0-rc3, Paolo Bonzini, 2021/04/13
- [PULL v2 1/3] osdep: include glib-compat.h before other QEMU headers, Paolo Bonzini, 2021/04/13
- [PULL v2 3/3] qapi/qom.json: Do not use CONFIG_VIRTIO_CRYPTO in common code, Paolo Bonzini, 2021/04/13
- Re: [PULL v2 0/3] osdep.h + QOM changes for QEMU 6.0-rc3, no-reply, 2021/04/13
- Re: [PULL v2 0/3] osdep.h + QOM changes for QEMU 6.0-rc3, Peter Maydell, 2021/04/13
- Re: [PULL v2 0/3] osdep.h + QOM changes for QEMU 6.0-rc3, Peter Maydell, 2021/04/14