summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarc-André Lureau2018-11-21 23:06:19 +0100
committerSamuel Thibault2019-01-14 00:44:29 +0100
commitdf2ad332da6c8dd3053b5d5f1b1cc1cbdf6bad5e (patch)
tree939b2178ea7f53e35bb7c969a33181492da76cb1 /net
parentslirp: Enable fork_exec support on Windows (diff)
downloadqemu-df2ad332da6c8dd3053b5d5f1b1cc1cbdf6bad5e.tar.gz
qemu-df2ad332da6c8dd3053b5d5f1b1cc1cbdf6bad5e.tar.xz
qemu-df2ad332da6c8dd3053b5d5f1b1cc1cbdf6bad5e.zip
slirp: drop <Vista compatibility
Since commit 12f8def0e02232d7c6416ad9b66640f973c531d1 (v2.9), qemu requires Vista. Let's remove some conditional code. Note that this introduces a missing declaration warning with mingw. warning: implicit declaration of function 'inet_ntop' See also: https://sourceforge.net/p/mingw-w64/mailman/message/36473782/ We could workaround it by declaring it ourself depending on __MINGW64_VERSION_*: WINSOCK_API_LINKAGE INT WSAAPI inet_pton(int Family, PCTSTR pszAddrString, PVOID pAddrBuf); Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'net')
-rw-r--r--net/slirp.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/net/slirp.c b/net/slirp.c
index b1c98b9470..2d5337da04 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -290,17 +290,6 @@ static int net_slirp_init(NetClientState *peer, const char *model,
}
#endif
-#if defined(_WIN32) && (_WIN32_WINNT < 0x0600)
- /* No inet_pton helper before Vista... */
- if (vprefix6) {
- /* Unsupported */
- error_setg(errp, "IPv6 prefix not supported");
- return -1;
- }
- memset(&ip6_prefix, 0, sizeof(ip6_prefix));
- ip6_prefix.s6_addr[0] = 0xfe;
- ip6_prefix.s6_addr[1] = 0xc0;
-#else
if (!vprefix6) {
vprefix6 = "fec0::";
}
@@ -308,7 +297,6 @@ static int net_slirp_init(NetClientState *peer, const char *model,
error_setg(errp, "Failed to parse IPv6 prefix");
return -1;
}
-#endif
if (!vprefix6_len) {
vprefix6_len = 64;
@@ -320,10 +308,6 @@ static int net_slirp_init(NetClientState *peer, const char *model,
}
if (vhost6) {
-#if defined(_WIN32) && (_WIN32_WINNT < 0x0600)
- error_setg(errp, "IPv6 host not supported");
- return -1;
-#else
if (!inet_pton(AF_INET6, vhost6, &ip6_host)) {
error_setg(errp, "Failed to parse IPv6 host");
return -1;
@@ -332,17 +316,12 @@ static int net_slirp_init(NetClientState *peer, const char *model,
error_setg(errp, "IPv6 Host doesn't belong to network");
return -1;
}
-#endif
} else {
ip6_host = ip6_prefix;
ip6_host.s6_addr[15] |= 2;
}
if (vnameserver6) {
-#if defined(_WIN32) && (_WIN32_WINNT < 0x0600)
- error_setg(errp, "IPv6 DNS not supported");
- return -1;
-#else
if (!inet_pton(AF_INET6, vnameserver6, &ip6_dns)) {
error_setg(errp, "Failed to parse IPv6 DNS");
return -1;
@@ -351,7 +330,6 @@ static int net_slirp_init(NetClientState *peer, const char *model,
error_setg(errp, "IPv6 DNS doesn't belong to network");
return -1;
}
-#endif
} else {
ip6_dns = ip6_prefix;
ip6_dns.s6_addr[15] |= 3;