提交 067afdf3 authored 作者: Michael Jerris's avatar Michael Jerris

fix for msvc 9 build.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6644 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 cfcc114b
......@@ -141,7 +141,7 @@ int sres_close(sres_socket_t s)
return closesocket(s);
}
#if !defined(IPPROTO_IPV6)
#if !defined(IPPROTO_IPV6) && (_WIN32_WINNT < 0x0600)
#if HAVE_SIN6
#include <tpipv6.h>
#else
......
......@@ -67,7 +67,7 @@
# include <winsock2.h>
# include <ws2tcpip.h>
# if SU_HAVE_IN6
# if defined(IPPROTO_IPV6)
# if defined(IPPROTO_IPV6) || (_WIN32_WINNT >= 0x0600)
/* case 1: IPv6 defined in winsock2.h/ws2tcpip.h */
# else
/* case 2: try to use "IPv6 Tech Preview" */
......
......@@ -67,6 +67,12 @@
#define MSG_NOSIGNAL (0)
#endif
#if (_WIN32_WINNT >= 0x0600)
#ifndef HAVE_MSG_TRUNC
#define HAVE_MSG_TRUNC 1
#endif
#endif
#if !HAVE_MSG_TRUNC
#define MSG_TRUNC (0)
#endif
......
......@@ -196,7 +196,7 @@ static void tport_check_trunc(tport_t *tp, su_addrinfo_t *ai)
n = su_sendto(tp->tp_socket,
"TEST", 4, 0,
(void *)ai->ai_addr, ai->ai_addrlen);
(void *)ai->ai_addr, (socklen_t)ai->ai_addrlen);
if (n != 4)
return;
......
......@@ -457,7 +457,13 @@
#define strncasecmp _strnicmp
#define snprintf _snprintf
#ifndef _MSC_VER
#define vsnprintf _vsnprintf
#endif
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#define srandom(x) srand((x))
#define random() rand()
......
......@@ -104,8 +104,13 @@
#define snprintf _snprintf
#endif
#ifndef vsnprintf
#ifndef _MSC_VER
#define vsnprintf _vsnprintf
#endif
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#endif
#define srandom(x) srand((x))
#define random() rand()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论