Skip to contentSkip to conversation

mingw: fix error __USE_MINGW_ANSI_STDIO redefined

PATCH Superseded [email protected] 2 participants 2 messages Oct 8, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mingw: fix error __USE_MINGW_ANSI_STDIO redefined

From: Marc-André Lureau <[email protected]>

Always put osdep.h first.

---
 migration/dirtyrate.c | 3 ++-
 tests/test-bitmap.c   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
migration/dirtyrate.c +2 -1
index 68577ef250..47f761e67a 100644
@@ -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"
tests/test-bitmap.c +2 -1
index 2f5b71458a..0a5775fb37 100644
@@ -8,8 +8,9 @@
  * Author: Peter Xu <[email protected]>
  */
 
-#include <stdlib.h>
 #include "qemu/osdep.h"
+
+#include <stdlib.h>
 #include "qemu/bitmap.h"
 
 #define BMAP_SIZE  1024
Signature · 1 line
2.28.0
#1 lore raw
Quoted 31 lines · On Thu, 8 Oct 2020 at 15:41, <[email protected]> wrote:

From: Marc-André Lureau <[email protected]>

Always put osdep.h first.

---
 migration/dirtyrate.c | 3 ++-
 tests/test-bitmap.c   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
migration/dirtyrate.c +2 -1
index 68577ef250..47f761e67a 100644
@@ -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"
tests/test-bitmap.c +0 -0
index 2f5b71458a..0a5775fb37 100644

tests/test-bitmap.c line 14

Quoted 8 lines
tests/test-bitmap.c +2 -1
@@ -8,8 +8,9 @@
  * Author: Peter Xu <[email protected]>
  */
 
-#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