summaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-15 21:39:41 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-15 21:39:41 +0000
commit02082dc9ecf3ad8176bafb083bdcf0effb267b49 (patch)
tree3ad986866e1bde1b8c6cf311e8f973d7944769ed /qemu-common.h
parentda07cf59b071c6b67f179001ba4377c12d384692 (diff)
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
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/qemu-common.h b/qemu-common.h
index 6ee31e0788..db6c1a612c 100644
--- a/qemu-common.h
+++ b/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 @@ struct iovec {
#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