mingw: Fix builds on f33 mingw
PATCH 1/1 mingw: Fix builds on f33 mingw
From: "Dr. David Alan Gilbert" <[email protected]>
Fedora 33's mingw moans about:
In file included from ../tests/test-bitmap.c:12:/home/dgilbert/git/migpull/include/qemu/osdep.h:76: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror]
76 | #define __USE_MINGW_ANSI_STDIO 1
|
the fix is to make sure osdep.h is the first include - which is our rule anyway; but one we broke in a couple of places.
--- migration/dirtyrate.c | 2 +- tests/test-bitmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
migration/dirtyrate.c +1 -1
@@ -10,8 +10,8 @@* 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 +1 -1
@@ -8,8 +8,8 @@* 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
Quoted 38 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
Fedora 33's mingw moans about:
In file included from
../tests/test-bitmap.c:12:/home/dgilbert/git/migpull/include/qemu/osdep.h:76: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror]
76 | #define__USE_MINGW_ANSI_STDIO1|the fix is to make sure
osdep.his the first include - which is our rule anyway; but one we broke in a couple of places.Signed-off-by Dr. David Alan Gilbert <[email protected]>--- migration/dirtyrate.c | 2 +- tests/test-bitmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)migration/dirtyrate.c +1
-1@@ -10,8 +10,8 @@* 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
tests/test-bitmap.c line 15
Quoted 9 lines
tests/test-bitmap.c +1
-1@@ -8,8 +8,8 @@* Author: Peter Xu <[email protected]> */ -#include <stdlib.h> #include "qemu/osdep.h" +#include <stdlib.h> #include "qemu/bitmap.h" #define BMAP_SIZE 1024
Laurent Vivier
AppliedLe 08/10/2020 à 19:46, Thomas Huth a écrit :
Quoted 46 lines · Dr. David Alan Gilbert (git)
Quoted 45 lines
From: "Dr. David Alan Gilbert" <[email protected]>
Fedora 33's mingw moans about:
In file included from
../tests/test-bitmap.c:12:/home/dgilbert/git/migpull/include/qemu/osdep.h:76: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror]
76 | #define__USE_MINGW_ANSI_STDIO1|the fix is to make sure
osdep.his the first include - which is our rule anyway; but one we broke in a couple of places.Signed-off-by Dr. David Alan Gilbert <[email protected]>--- migration/dirtyrate.c | 2 +- tests/test-bitmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)migration/dirtyrate.c +1
-1@@ -10,8 +10,8 @@* 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 +1
-1@@ -8,8 +8,8 @@* Author: Peter Xu <[email protected]> */ -#include <stdlib.h> #include "qemu/osdep.h" +#include <stdlib.h> #include "qemu/bitmap.h"
Quoted 6 lines
tests/test-bitmap.c line 15
Quoted 2 lines
tests/test-bitmap.c +0
-0#define BMAP_SIZE 1024Reviewed-by Thomas Huth <[email protected]>
Applied to my trivial-patches branch.
Thanks,
Laurent
Quoted 48 lines · Laurent Vivier
Quoted 46 lines · Thomas Huth
Quoted 45 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
Fedora 33's mingw moans about:
In file included from
../tests/test-bitmap.c:12:/home/dgilbert/git/migpull/include/qemu/osdep.h:76: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror]
76 | #define__USE_MINGW_ANSI_STDIO1|the fix is to make sure
osdep.his the first include - which is our rule anyway; but one we broke in a couple of places.Signed-off-by Dr. David Alan Gilbert <[email protected]>--- migration/dirtyrate.c | 2 +- tests/test-bitmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)migration/dirtyrate.c +1
-1@@ -10,8 +10,8 @@* 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 +1
-1@@ -8,8 +8,8 @@* Author: Peter Xu <[email protected]> */ -#include <stdlib.h> #include "qemu/osdep.h" +#include <stdlib.h> #include "qemu/bitmap.h"
Quoted 8 lines
Quoted 6 lines
tests/test-bitmap.c line 15
Quoted 2 lines
tests/test-bitmap.c +0
-0#define BMAP_SIZE 1024Reviewed-by Thomas Huth <[email protected]>Applied to my trivial-patches branch.
This is the wrong version of this patch -- can you take Marc-André's instead, please?
thanks
-- PMM
Le 12/10/2020 à 17:05, Peter Maydell a écrit :
Quoted 56 lines · Laurent Vivier
Quoted 55 lines · Thomas Huth
Quoted 52 lines · Dr. David Alan Gilbert (git)
Quoted 38 lines
From: "Dr. David Alan Gilbert" <[email protected]>
Fedora 33's mingw moans about:
In file included from
../tests/test-bitmap.c:12:/home/dgilbert/git/migpull/include/qemu/osdep.h:76: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror]
76 | #define__USE_MINGW_ANSI_STDIO1|the fix is to make sure
osdep.his the first include - which is our rule anyway; but one we broke in a couple of places.Signed-off-by Dr. David Alan Gilbert <[email protected]>--- migration/dirtyrate.c | 2 +- tests/test-bitmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)migration/dirtyrate.c +1
-1@@ -10,8 +10,8 @@* 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
-0tests/test-bitmap.c line 15
Quoted 9 lines
tests/test-bitmap.c +1
-1@@ -8,8 +8,8 @@* Author: Peter Xu <[email protected]> */ -#include <stdlib.h> #include "qemu/osdep.h" +#include <stdlib.h> #include "qemu/bitmap.h" #define BMAP_SIZE 1024Reviewed-by Thomas Huth <[email protected]>
Quoted 4 lines
Quoted 1 line
Applied to my trivial-patches branch.
This is the wrong version of this patch -- can you take Marc-André's instead, please?
Yes, queueing instead:
"[PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined"
Thanks,
Laurent
tests/test-bitmap.c line 12
Quoted 3 lines · Dr. David Alan Gilbert (git)
tests/test-bitmap.c +1
-1-#include <stdlib.h> #include "qemu/osdep.h" +#include <stdlib.h>
As pointed out by pmm earlier, for someone else's version of this patch, <stdlib.h> should simply be removed here -- it's already included by osdep.h.
r~
Quoted 11 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
Fedora 33's mingw moans about:
In file included from
../tests/test-bitmap.c:12:/home/dgilbert/git/migpull/include/qemu/osdep.h:76: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror]
76 | #define__USE_MINGW_ANSI_STDIO1|the fix is to make sure
osdep.his the first include - which is our rule anyway; but one we broke in a couple of places.
Marc-André sent the same fix:
https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02191.html
Quoted 36 lines
Signed-off-by Dr. David Alan Gilbert <[email protected]>--- migration/dirtyrate.c | 2 +- tests/test-bitmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)migration/dirtyrate.c +1
-1@@ -10,8 +10,8 @@* 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 +1
-1@@ -8,8 +8,8 @@* Author: Peter Xu <[email protected]> */ -#include <stdlib.h> #include "qemu/osdep.h" +#include <stdlib.h> #include "qemu/bitmap.h" #define BMAP_SIZE 1024