From: Bruce Cran Date: Tue, 28 Jan 2014 19:54:17 +0000 (-0700) Subject: Fix Windows headers for IPv6 X-Git-Tag: fio-2.1.5~23 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=47c7c1f526f1038abe7df350d02231220b3eecb9;p=fio.git Fix Windows headers for IPv6 MinGW includes all the necessary IPv6 definitions, so include ws2tcpip.h and remove the custom definitions. Signed-off-by: Jens Axboe --- diff --git a/os/windows/posix/include/arpa/inet.h b/os/windows/posix/include/arpa/inet.h index 59c50ad1..30498c67 100644 --- a/os/windows/posix/include/arpa/inet.h +++ b/os/windows/posix/include/arpa/inet.h @@ -1,21 +1,14 @@ #ifndef ARPA_INET_H #define ARPA_INET_H -#include +#include #include typedef int socklen_t; typedef int in_addr_t; -#define IP_MULTICAST_IF 2 -#define IP_MULTICAST_TTL 3 -#define IP_ADD_MEMBERSHIP 5 - -struct ip_mreq -{ - struct in_addr imr_multiaddr; - struct in_addr imr_interface; -}; +/* EAI_SYSTEM isn't used on Windows, so map it to EAI_FAIL */ +#define EAI_SYSTEM EAI_FAIL in_addr_t inet_network(const char *cp); diff --git a/os/windows/posix/include/netinet/in.h b/os/windows/posix/include/netinet/in.h index b58c209f..f7e24197 100644 --- a/os/windows/posix/include/netinet/in.h +++ b/os/windows/posix/include/netinet/in.h @@ -4,18 +4,5 @@ #include #include -struct in6_addr -{ - uint8_t s6_addr[16]; -}; - -struct sockaddr_in6 -{ - sa_family_t sin6_family; /* AF_INET6 */ - in_port_t sin6_port; /* Port number */ - uint32_t sin6_flowinfo; /* IPv6 traffic class and flow information */ - struct in6_addr sin6_addr; /* IPv6 address */ - uint32_t sin6_scope_id; /* Set of interfaces for a scope */ -}; #endif /* NETINET_IN_H */