ws2_32: Added implementation for inet_ntop.
diff --git a/configure b/configure
index 43ea106..2cc3711 100755
--- a/configure
+++ b/configure
Binary files differ
diff --git a/configure.ac b/configure.ac
index 400011c..8ace1cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1387,6 +1387,7 @@
gettid \
gettimeofday \
getuid \
+ inet_ntop \
inet_pton \
kqueue \
lstat \
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 14f357f..5b748c8 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -4555,6 +4555,30 @@
}
/***********************************************************************
+ * inet_ntop (WS2_32.@)
+ */
+PCSTR WINAPI WS_inet_ntop( INT family, PVOID addr, PSTR buffer, size_t len )
+{
+#ifdef HAVE_INET_NTOP
+ union generic_unix_sockaddr unix_addr;
+
+ switch (family)
+ {
+ case WS_AF_INET:
+ ws_sockaddr_ws2u( addr, sizeof(struct WS_sockaddr_in), &unix_addr );
+ return inet_ntop( AF_INET, &unix_addr, buffer, len );
+ case WS_AF_INET6:
+ ws_sockaddr_ws2u( addr, sizeof(struct WS_sockaddr_in6), &unix_addr );
+ return inet_ntop( AF_INET6, &unix_addr, buffer, len );
+ }
+#else
+ FIXME( "not supported on this platform\n" );
+#endif
+ WSASetLastError( WSAEAFNOSUPPORT );
+ return NULL;
+}
+
+/***********************************************************************
* WSAStringToAddressA (WS2_32.80)
*/
INT WINAPI WSAStringToAddressA(LPSTR AddressString,
diff --git a/dlls/ws2_32/ws2_32.spec b/dlls/ws2_32/ws2_32.spec
index bbcafc0..74e71be 100644
--- a/dlls/ws2_32/ws2_32.spec
+++ b/dlls/ws2_32/ws2_32.spec
@@ -117,3 +117,4 @@
@ stdcall freeaddrinfo(ptr) WS_freeaddrinfo
@ stdcall getaddrinfo(str str ptr ptr) WS_getaddrinfo
@ stdcall getnameinfo(ptr long ptr long ptr long long) WS_getnameinfo
+@ stdcall inet_ntop(long ptr ptr long) WS_inet_ntop
diff --git a/include/config.h.in b/include/config.h.in
index 4aafaed..1753e41 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -249,6 +249,9 @@
/* Define to 1 if you have the `inet_network' function. */
#undef HAVE_INET_NETWORK
+/* Define to 1 if you have the `inet_ntop' function. */
+#undef HAVE_INET_NTOP
+
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON