Skip to contentSkip to conversation

[6330] Fix Windows build (Herv?\195?\169 Poussineau)

Qemu-devel Anthony Liguori 1 participant 1 message Jan 15, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6330

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6330
Author:   aliguori
Date:     2009-01-15 21:39:41 +0000 (Thu, 15 Jan 2009)

Log Message:
-----------
Fix Windows build (Herv?\195?\169 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.

Modified Paths:
--------------
trunk/qemu-common.h

Modified: trunk/qemu-common.h
===================================================================

qemu-common.h +6 -3
@@ -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