summaryrefslogtreecommitdiff
path: root/os/windows/posix/include
diff options
context:
space:
mode:
authorBruce Cran <bcran@fusionio.com>2014-01-28 12:54:17 -0700
committerJens Axboe <axboe@kernel.dk>2014-01-28 13:04:36 -0700
commit47c7c1f526f1038abe7df350d02231220b3eecb9 (patch)
treeb93071c4415075de8e1d0269ac4f2974e96a99c4 /os/windows/posix/include
parenteb2323108392e65ab7c4e4c5cbd74a1597b60187 (diff)
downloadfio-47c7c1f526f1038abe7df350d02231220b3eecb9.tar.gz
fio-47c7c1f526f1038abe7df350d02231220b3eecb9.tar.bz2
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 <axboe@kernel.dk>
Diffstat (limited to 'os/windows/posix/include')
-rw-r--r--os/windows/posix/include/arpa/inet.h13
-rw-r--r--os/windows/posix/include/netinet/in.h13
2 files changed, 3 insertions, 23 deletions
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 <winsock2.h>
+#include <ws2tcpip.h>
#include <inttypes.h>
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 <inttypes.h>
#include <sys/un.h>
-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 */