[PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined

marcandre.lureau@redhat.com posted 1 patch 5 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201008165953.884599-1-marcandre.lureau@redhat.com
migration/dirtyrate.c | 3 ++-
tests/test-bitmap.c   | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined
Posted by marcandre.lureau@redhat.com 5 years, 1 month ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Always put osdep.h first, and remove redundant stdlib.h include.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 migration/dirtyrate.c | 3 ++-
 tests/test-bitmap.c   | 1 -
 2 files changed, 2 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..8db4f67883 100644
--- a/tests/test-bitmap.c
+++ b/tests/test-bitmap.c
@@ -8,7 +8,6 @@
  * Author: Peter Xu <peterx@redhat.com>
  */
 
-#include <stdlib.h>
 #include "qemu/osdep.h"
 #include "qemu/bitmap.h"
 
-- 
2.28.0


Re: [PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined
Posted by Peter Maydell 5 years, 1 month ago
On Thu, 8 Oct 2020 at 18:03, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Always put osdep.h first, and remove redundant stdlib.h include.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  migration/dirtyrate.c | 3 ++-
>  tests/test-bitmap.c   | 1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

Re: [PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined
Posted by Philippe Mathieu-Daudé 5 years, 1 month ago
On 10/8/20 6:59 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Always put osdep.h first, and remove redundant stdlib.h include.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  migration/dirtyrate.c | 3 ++-
>  tests/test-bitmap.c   | 1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined
Posted by Laurent Vivier 5 years, 1 month ago
Le 08/10/2020 à 18:59, marcandre.lureau@redhat.com a écrit :
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Always put osdep.h first, and remove redundant stdlib.h include.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  migration/dirtyrate.c | 3 ++-
>  tests/test-bitmap.c   | 1 -
>  2 files changed, 2 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..8db4f67883 100644
> --- a/tests/test-bitmap.c
> +++ b/tests/test-bitmap.c
> @@ -8,7 +8,6 @@
>   * Author: Peter Xu <peterx@redhat.com>
>   */
>  
> -#include <stdlib.h>
>  #include "qemu/osdep.h"
>  #include "qemu/bitmap.h"
>  
> 

Applied to my trivial-patches branch.

Thanks,
Laurent


Re: [PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined
Posted by Stefan Weil 5 years, 1 month ago
Am 08.10.20 um 18:59 schrieb marcandre.lureau@redhat.com:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Always put osdep.h first, and remove redundant stdlib.h include.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   migration/dirtyrate.c | 3 ++-
>   tests/test-bitmap.c   | 1 -
>   2 files changed, 2 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..8db4f67883 100644
> --- a/tests/test-bitmap.c
> +++ b/tests/test-bitmap.c
> @@ -8,7 +8,6 @@
>    * Author: Peter Xu <peterx@redhat.com>
>    */
>   
> -#include <stdlib.h>
>   #include "qemu/osdep.h"
>   #include "qemu/bitmap.h"
>   


Reviewed-by: Stefan Weil <sw@weilnetz.de>

Thank you,
Stefan