Skip to contentSkip to conversation

Fix Windows build

PATCH Applied Hervé Poussineau 2 participants 2 messages Jan 15, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix Windows build

Hi,

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.

Hervé

qemu-common.h +6 -3
Index: qemu-common.h
===================================================================
@@ -2,6 +2,12 @@
 #ifndef QEMU_COMMON_H
 #define QEMU_COMMON_H
 
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#define WINVER 0x0501  /* needed for ipv6 bits */
+#include <windows.h>
+#endif
+
 #define noreturn __attribute__ ((__noreturn__))
 
 /* Hack around the mess dyngen-exec.h causes: We need noreturn in files that
@@ -47,9 +53,6 @@
 #endif
 
 #ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#define WINVER 0x0501  /* needed for ipv6 bits */
-#include <windows.h>
 #define fsync _commit
 #define lseek _lseeki64
 #define ENOTSUP 4096
#1 lore raw
Quoted 6 lines · Hervé Poussineau

Hi,

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.

Applied. Thanks.

There are CRs in the patch. Please watch out for that in the future.

Regards,

Anthony Liguori

Quoted 1 line

Hervé