summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/socketaddr.h
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/win32unix/socketaddr.h')
-rw-r--r--otherlibs/win32unix/socketaddr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/otherlibs/win32unix/socketaddr.h b/otherlibs/win32unix/socketaddr.h
index 26deff64b..a78f8a698 100644
--- a/otherlibs/win32unix/socketaddr.h
+++ b/otherlibs/win32unix/socketaddr.h
@@ -18,6 +18,9 @@
union sock_addr_union {
struct sockaddr s_gen;
struct sockaddr_in s_inet;
+#ifdef HAS_IPV6
+ struct sockaddr_in6 s_inet6;
+#endif
};
extern union sock_addr_union sock_addr;
@@ -35,3 +38,8 @@ CAMLprim value alloc_sockaddr (union sock_addr_union * addr /*in*/,
socklen_param_type addr_len, int close_on_error);
CAMLprim value alloc_inet_addr (struct in_addr * inaddr);
#define GET_INET_ADDR(v) (*((struct in_addr *) (v)))
+
+#ifdef HAS_IPV6
+CAMLexport value alloc_inet6_addr (struct in6_addr * inaddr);
+#define GET_INET6_ADDR(v) (*((struct in6_addr *) (v)))
+#endif