提交 5d15dc10 authored 作者: Michael Jerris's avatar Michael Jerris

fix windows missing inet_ntop missing symbol when built on >= vista but run on < vista

上级 f04bff40
...@@ -1331,7 +1331,7 @@ static const char *switch_inet_ntop4(const unsigned char *src, char *dst, size_t ...@@ -1331,7 +1331,7 @@ static const char *switch_inet_ntop4(const unsigned char *src, char *dst, size_t
return strcpy(dst, tmp); return strcpy(dst, tmp);
} }
#if HAVE_SIN6 || (defined(NTDDI_VERSION) && (NTDDI_VERSION < NTDDI_VISTA)) #if HAVE_SIN6 || defined(NTDDI_VERSION)
/* const char * /* const char *
* inet_ntop6(src, dst, size) * inet_ntop6(src, dst, size)
* convert IPv6 binary address into presentation (printable) format * convert IPv6 binary address into presentation (printable) format
...@@ -1488,7 +1488,7 @@ SWITCH_DECLARE(char *) get_addr6(char *buf, switch_size_t len, struct sockaddr_i ...@@ -1488,7 +1488,7 @@ SWITCH_DECLARE(char *) get_addr6(char *buf, switch_size_t len, struct sockaddr_i
*buf = '\0'; *buf = '\0';
if (sa) { if (sa) {
#if defined(NTDDI_VERSION) && (NTDDI_VERSION < NTDDI_VISTA) #if defined(NTDDI_VERSION)
switch_inet_ntop6((unsigned char*)sa, buf, len); switch_inet_ntop6((unsigned char*)sa, buf, len);
#else #else
inet_ntop(AF_INET6, sa, buf, len); inet_ntop(AF_INET6, sa, buf, len);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论