[Freeswitch-svn] [commit] r6644 - in freeswitch/trunk/libs/sofia-sip: libsofia-sip-ua/sresolv libsofia-sip-ua/su/sofia-sip libsofia-sip-ua/tport win32 win32/sofia-sip

Freeswitch SVN mikej at freeswitch.org
Tue Dec 11 10:58:20 EST 2007


Author: mikej
Date: Tue Dec 11 10:58:20 2007
New Revision: 6644

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
   freeswitch/trunk/libs/sofia-sip/win32/config.h.in
   freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h

Log:
fix for msvc 9 build.

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c	Tue Dec 11 10:58:20 2007
@@ -141,7 +141,7 @@
   return closesocket(s);
 }
 
-#if !defined(IPPROTO_IPV6)
+#if !defined(IPPROTO_IPV6) && (_WIN32_WINNT < 0x0600)
 #if HAVE_SIN6
 #include <tpipv6.h>
 #else

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h	Tue Dec 11 10:58:20 2007
@@ -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" */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h	Tue Dec 11 10:58:20 2007
@@ -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

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c	Tue Dec 11 10:58:20 2007
@@ -196,7 +196,7 @@
 
   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;

Modified: freeswitch/trunk/libs/sofia-sip/win32/config.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/config.h.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/config.h.in	Tue Dec 11 10:58:20 2007
@@ -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()

Modified: freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h	Tue Dec 11 10:58:20 2007
@@ -104,7 +104,12 @@
 #define snprintf    _snprintf
 #endif
 #ifndef vsnprintf
-#define vsnprintf   _vsnprintf
+#ifndef _MSC_VER 
+#define vsnprintf _vsnprintf
+#endif
+#if _MSC_VER < 1500
+#define vsnprintf _vsnprintf
+#endif
 #endif
 
 #define srandom(x)    srand((x))



More information about the Freeswitch-svn mailing list