* Sync to recent trunk (r52563).
[reactos.git] / dll / win32 / rpcrt4 / unix_func.c
1 #include <string.h>
2 #include <winsock2.h>
3 #include <windows.h>
4 #include <io.h>
5
6 const char *
7 WSAAPI
8 inet_ntop (int af,
9 const void *src,
10 char *dst,
11 size_t cnt)
12 {
13 struct in_addr in;
14 char *text_addr;
15
16 if (af == AF_INET)
17 {
18 memcpy(&in.s_addr, src, sizeof(in.s_addr));
19 text_addr = inet_ntoa(in);
20 if (text_addr && dst)
21 {
22 strncpy(dst, text_addr, cnt);
23 return dst;
24 }
25 }
26
27 return 0;
28 }
29