diff mbox series

mingw: fix error __USE_MINGW_ANSI_STDIO redefined

Message ID 20201008143951.820084-1-marcandre.lureau@redhat.com
State Superseded
Headers show
Series mingw: fix error __USE_MINGW_ANSI_STDIO redefined | expand

Commit Message

Marc-André Lureau Oct. 8, 2020, 2:39 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Always put osdep.h first.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 migration/dirtyrate.c | 3 ++-
 tests/test-bitmap.c   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Peter Maydell Oct. 8, 2020, 2:43 p.m. UTC | #1
On Thu, 8 Oct 2020 at 15:41, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Always put osdep.h first.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  migration/dirtyrate.c | 3 ++-
>  tests/test-bitmap.c   | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
> index 68577ef250..47f761e67a 100644
> --- a/migration/dirtyrate.c
> +++ b/migration/dirtyrate.c
> @@ -10,8 +10,9 @@
>   * See the COPYING file in the top-level directory.
>   */
>
> -#include <zlib.h>
>  #include "qemu/osdep.h"
> +
> +#include <zlib.h>
>  #include "qapi/error.h"
>  #include "cpu.h"
>  #include "qemu/config-file.h"
> diff --git a/tests/test-bitmap.c b/tests/test-bitmap.c
> index 2f5b71458a..0a5775fb37 100644
> --- a/tests/test-bitmap.c
> +++ b/tests/test-bitmap.c
> @@ -8,8 +8,9 @@
>   * Author: Peter Xu <peterx@redhat.com>
>   */
>
> -#include <stdlib.h>
>  #include "qemu/osdep.h"
> +
> +#include <stdlib.h>
>  #include "qemu/bitmap.h"

osdep.h includes stdlib for you, so you can just delete
this #include line entirely.

thanks
-- PMM
diff mbox series

Patch

diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
index 68577ef250..47f761e67a 100644
--- a/migration/dirtyrate.c
+++ b/migration/dirtyrate.c
@@ -10,8 +10,9 @@ 
  * See the COPYING file in the top-level directory.
  */
 
-#include <zlib.h>
 #include "qemu/osdep.h"
+
+#include <zlib.h>
 #include "qapi/error.h"
 #include "cpu.h"
 #include "qemu/config-file.h"
diff --git a/tests/test-bitmap.c b/tests/test-bitmap.c
index 2f5b71458a..0a5775fb37 100644
--- a/tests/test-bitmap.c
+++ b/tests/test-bitmap.c
@@ -8,8 +8,9 @@ 
  * Author: Peter Xu <peterx@redhat.com>
  */
 
-#include <stdlib.h>
 #include "qemu/osdep.h"
+
+#include <stdlib.h>
 #include "qemu/bitmap.h"
 
 #define BMAP_SIZE  1024