aboutsummaryrefslogtreecommitdiff
path: root/qemu-os-win32.h
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-04-12 21:13:15 +0200
committerStefan Weil <sw@weilnetz.de>2012-04-15 21:25:16 +0200
commitacf126ba58425f11e74fbb9c1095224cb142fffa (patch)
tree6ec69a3a5e1622ce6f4f4cf6d3826a1d44d99a59 /qemu-os-win32.h
parent6840981dfb76a1a1d2401efdb237ed5ddac8bf2f (diff)
w32: Move defines for socket specific errors to qemu-os-win32.h
As those defines are only used for w32, they should be in the header file for w32. All files which include slirp.h or qemu_socket.h also include qemu-os-win32.h. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'qemu-os-win32.h')
-rw-r--r--qemu-os-win32.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/qemu-os-win32.h b/qemu-os-win32.h
index 8eda4bdc20..b6533c0979 100644
--- a/qemu-os-win32.h
+++ b/qemu-os-win32.h
@@ -30,6 +30,32 @@
#include <winsock2.h>
#include "main-loop.h"
+/* Workaround for older versions of MinGW. */
+#ifndef ECONNREFUSED
+# define ECONNREFUSED WSAECONNREFUSED
+#endif
+#ifndef EINPROGRESS
+# define EINPROGRESS WSAEINPROGRESS
+#endif
+#ifndef EHOSTUNREACH
+# define EHOSTUNREACH WSAEHOSTUNREACH
+#endif
+#ifndef EINTR
+# define EINTR WSAEINTR
+#endif
+#ifndef EINPROGRESS
+# define EINPROGRESS WSAEINPROGRESS
+#endif
+#ifndef ENETUNREACH
+# define ENETUNREACH WSAENETUNREACH
+#endif
+#ifndef ENOTCONN
+# define ENOTCONN WSAENOTCONN
+#endif
+#ifndef EWOULDBLOCK
+# define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+
/* Declaration of ffs() is missing in MinGW's strings.h. */
int ffs(int i);