reactos/dll/win32/rpcrt4/unix_func.c
Amine Khaldi c424146e2c Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
2010-07-24 18:52:44 +00:00

29 lines
495 B
C

#include <string.h>
#include <winsock2.h>
#include <windows.h>
#include <io.h>
const char *
WSAAPI
inet_ntop (int af,
const void *src,
char *dst,
size_t cnt)
{
struct in_addr in;
char *text_addr;
if (af == AF_INET)
{
memcpy(&in.s_addr, src, sizeof(in.s_addr));
text_addr = inet_ntoa(in);
if (text_addr && dst)
{
strncpy(dst, text_addr, cnt);
return dst;
}
}
return 0;
}