freerdp: remove static inet_ntop

inet_ntop is already implemented in winpr
This commit is contained in:
Norbert Federa 2016-06-15 18:01:38 +02:00
parent 7a68eebb03
commit 6a3b48d4f0

View File

@ -48,36 +48,6 @@
#define TAG FREERDP_TAG("core.listener")
#ifdef _WIN32
#if _WIN32_WINNT < 0x0600
static const char* inet_ntop(int af, const void* src, char* dst, size_t cnt)
{
if (af == AF_INET)
{
struct sockaddr_in in;
memset(&in, 0, sizeof(in));
in.sin_family = AF_INET;
memcpy(&in.sin_addr, src, sizeof(struct in_addr));
getnameinfo((struct sockaddr *)&in, sizeof(struct sockaddr_in), dst, cnt, NULL, 0, NI_NUMERICHOST);
return dst;
}
else if (af == AF_INET6)
{
struct sockaddr_in6 in;
memset(&in, 0, sizeof(in));
in.sin6_family = AF_INET6;
memcpy(&in.sin6_addr, src, sizeof(struct in_addr6));
getnameinfo((struct sockaddr*) &in, sizeof(struct sockaddr_in6), dst, cnt, NULL, 0, NI_NUMERICHOST);
return dst;
}
return NULL;
}
#endif
#endif
static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_address, UINT16 port)
{
int status;