summaryrefslogtreecommitdiffstats
path: root/slirp/ndp_table.c
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 /slirp/ndp_table.c
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 'slirp/ndp_table.c')
-rw-r--r--slirp/ndp_table.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/slirp/ndp_table.c b/slirp/ndp_table.c
index a4e6421fd3..1401e1b322 100644
--- a/slirp/ndp_table.c
+++ b/slirp/ndp_table.c
@@ -10,15 +10,14 @@
void ndp_table_add(Slirp *slirp, struct in6_addr ip_addr,
uint8_t ethaddr[ETH_ALEN])
{
+ char addrstr[INET6_ADDRSTRLEN];
NdpTable *ndp_table = &slirp->ndp_table;
int i;
- DEBUG_CALL("ndp_table_add");
-#if !defined(_WIN32) || (_WIN32_WINNT >= 0x0600)
- char addrstr[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, &(ip_addr), addrstr, INET6_ADDRSTRLEN);
+
+ DEBUG_CALL("ndp_table_add");
DEBUG_ARG("ip = %s", addrstr);
-#endif
DEBUG_ARGS(" hw addr = %02x:%02x:%02x:%02x:%02x:%02x\n",
ethaddr[0], ethaddr[1], ethaddr[2],
ethaddr[3], ethaddr[4], ethaddr[5]);
@@ -50,15 +49,14 @@ void ndp_table_add(Slirp *slirp, struct in6_addr ip_addr,
bool ndp_table_search(Slirp *slirp, struct in6_addr ip_addr,
uint8_t out_ethaddr[ETH_ALEN])
{
+ char addrstr[INET6_ADDRSTRLEN];
NdpTable *ndp_table = &slirp->ndp_table;
int i;
- DEBUG_CALL("ndp_table_search");
-#if !defined(_WIN32) || (_WIN32_WINNT >= 0x0600)
- char addrstr[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, &(ip_addr), addrstr, INET6_ADDRSTRLEN);
+
+ DEBUG_CALL("ndp_table_search");
DEBUG_ARG("ip = %s", addrstr);
-#endif
assert(!in6_zero(&ip_addr));