[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/31] slirp: improve windows headers inclusion
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULL 17/31] slirp: improve windows headers inclusion |
Date: |
Sun, 27 Jan 2019 13:05:12 +0100 |
From: Marc-André Lureau <address@hidden>
Our API usage requires Vista, set WIN32_LEAN_AND_MEAN to fix a number
of issues (winsock2.h include order for ex, which is better to include
first for legacy reasons).
While at it, group redundants #ifndef _WIN32 blocks.
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
slirp/slirp.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/slirp/slirp.h b/slirp/slirp.h
index 8d9d72ca9d..5a830ddcb8 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -3,10 +3,19 @@
#ifdef _WIN32
+/* as defined in sdkddkver.h */
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0600 /* Vista */
+#endif
+/* reduces the number of implicitly included headers */
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
typedef char *caddr_t;
-# include <windows.h>
# include <winsock2.h>
+# include <windows.h>
# include <ws2tcpip.h>
# include <sys/timeb.h>
# include <iphlpapi.h>
@@ -19,19 +28,10 @@ typedef char *caddr_t;
#ifndef _WIN32
#include <sys/uio.h>
-#endif
-
-#ifndef _WIN32
#include <netinet/in.h>
#include <arpa/inet.h>
-#endif
-
-#ifndef _WIN32
#include <sys/socket.h>
-#endif
-
-#ifndef _WIN32
-# include <sys/ioctl.h>
+#include <sys/ioctl.h>
#endif
#ifdef __APPLE__
--
2.20.1
- [Qemu-devel] [PULL 08/31] slirp: add callbacks for timer, (continued)
- [Qemu-devel] [PULL 08/31] slirp: add callbacks for timer, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 14/31] slirp: replace qemu_notify_event() with a callback, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 23/31] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 09/31] slirp: replace trace functions with DEBUG calls, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 03/31] slirp: Don't mark struct ipq or struct ipasfrag as packed, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 16/31] slirp: do not include qemu headers in libslirp.h public API header, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 13/31] slirp: add unregister_poll_fd() callback, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 28/31] slirp: remove slirp_instances list, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 10/31] slirp: replace QEMU_PACKED with SLIRP_PACKED, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 12/31] slirp: replace qemu_set_nonblock(), Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 17/31] slirp: improve windows headers inclusion,
Samuel Thibault <=
- [Qemu-devel] [PULL 15/31] slirp: move QEMU state saving to a separate unit, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 18/31] slirp: add slirp own version of pstrcpy, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 21/31] slirp: replace net/eth.h inclusion with own defines, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 11/31] slirp: replace most qemu socket utilities with slirp own version, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 20/31] slirp: remove now useless QEMU headers inclusions, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 31/31] slirp: API is extern C, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 29/31] slirp: use polling callbacks, drop glib requirement, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 30/31] slirp: pass opaque to all callbacks, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 27/31] slirp: replace global polling with per-instance & notifier, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 24/31] slirp: replace remaining qemu headers dependency, Samuel Thibault, 2019/01/27