Commit 02082dc9ecf3ad8176bafb083bdcf0effb267b49

Authored by aliguori
1 parent da07cf59

Fix Windows build (Hervé Poussineau)

r6303 broke Windows build, where "noreturn" is a keyword used with __declspec.
Attached patch fixes Windows build, by moving windows.h header inclusion before Qemu noreturn define.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> 
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6330 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 3 deletions
qemu-common.h
... ... @@ -2,6 +2,12 @@
2 2 #ifndef QEMU_COMMON_H
3 3 #define QEMU_COMMON_H
4 4  
  5 +#ifdef _WIN32
  6 +#define WIN32_LEAN_AND_MEAN
  7 +#define WINVER 0x0501 /* needed for ipv6 bits */
  8 +#include <windows.h>
  9 +#endif
  10 +
5 11 #define noreturn __attribute__ ((__noreturn__))
6 12  
7 13 /* Hack around the mess dyngen-exec.h causes: We need noreturn in files that
... ... @@ -47,9 +53,6 @@ struct iovec {
47 53 #endif
48 54  
49 55 #ifdef _WIN32
50   -#define WIN32_LEAN_AND_MEAN
51   -#define WINVER 0x0501 /* needed for ipv6 bits */
52   -#include <windows.h>
53 56 #define fsync _commit
54 57 #define lseek _lseeki64
55 58 #define ENOTSUP 4096
... ...