[Freeswitch-trunk] [commit] r6630 - in freeswitch/trunk/libs: udns win32/udns

Freeswitch SVN mikej at freeswitch.org
Tue Dec 11 05:10:03 EST 2007


Author: mikej
Date: Tue Dec 11 05:10:03 2007
New Revision: 6630

Modified:
   freeswitch/trunk/libs/udns/inet_pton.c
   freeswitch/trunk/libs/udns/inet_pton.h
   freeswitch/trunk/libs/udns/udns_resolver.c
   freeswitch/trunk/libs/win32/udns/libudns.vcproj

Log:
fix for msvc 9 build.

Modified: freeswitch/trunk/libs/udns/inet_pton.c
==============================================================================
--- freeswitch/trunk/libs/udns/inet_pton.c	(original)
+++ freeswitch/trunk/libs/udns/inet_pton.c	Tue Dec 11 05:10:03 2007
@@ -69,7 +69,7 @@
  *      Paul Vixie, 1996.
  */
 int
-inet_pton(int af, const char *src, void *dst)
+udns_inet_pton(int af, const char *src, void *dst)
 {
   switch (af) {
   case AF_INET:

Modified: freeswitch/trunk/libs/udns/inet_pton.h
==============================================================================
--- freeswitch/trunk/libs/udns/inet_pton.h	(original)
+++ freeswitch/trunk/libs/udns/inet_pton.h	Tue Dec 11 05:10:03 2007
@@ -23,6 +23,6 @@
  * $Id: inet_pton.h,v 1.7 2005/11/28 20:21:36 bagder Exp $
  ***************************************************************************/
 
-int inet_pton(int, const char *, void *);
+int udns_inet_pton(int, const char *, void *);
 
 #endif /* __INET_PTON_H */

Modified: freeswitch/trunk/libs/udns/udns_resolver.c
==============================================================================
--- freeswitch/trunk/libs/udns/udns_resolver.c	(original)
+++ freeswitch/trunk/libs/udns/udns_resolver.c	Tue Dec 11 05:10:03 2007
@@ -34,8 +34,10 @@
 #define _CRT_NONSTDC_NO_DEPRECATE
 #endif
 #endif // VC8+
-#include "inet_pton.h"
+int udns_inet_pton(int, const char *, void *);
 #include "process.h"
+#else
+#define udns_inet_pton inet_pton
 #endif
 # include <winsock2.h>          /* includes <windows.h> */
 # include <ws2tcpip.h>          /* needed for struct in6_addr */
@@ -282,12 +284,12 @@
 #if HAVE_INET6
   { struct in_addr addr;
     struct in6_addr addr6;
-    if (inet_pton(AF_INET, serv, &addr) > 0) {
+    if (udns_inet_pton(AF_INET, serv, &addr) > 0) {
       sns->sin.sin_family = AF_INET;
       sns->sin.sin_addr = addr;
       return ++ctx->dnsc_nserv;
     }
-    if (inet_pton(AF_INET6, serv, &addr6) > 0) {
+    if (udns_inet_pton(AF_INET6, serv, &addr6) > 0) {
       sns->sin6.sin6_family = AF_INET6;
       sns->sin6.sin6_addr = addr6;
       return ++ctx->dnsc_nserv;

Modified: freeswitch/trunk/libs/win32/udns/libudns.vcproj
==============================================================================
--- freeswitch/trunk/libs/win32/udns/libudns.vcproj	(original)
+++ freeswitch/trunk/libs/win32/udns/libudns.vcproj	Tue Dec 11 05:10:03 2007
@@ -209,6 +209,10 @@
 			Filter="h;hpp;hxx;hm;inl;inc;xsd"
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
 			>
+			<File
+				RelativePath="..\..\udns\inet_pton.h"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Resource Files"



More information about the Freeswitch-trunk mailing list