From 5c19d7f5d12c3bd07ae38b721786e63fb922b6e9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 11 Dec 2007 10:10:03 +0000 Subject: [PATCH] fix for msvc 9 build. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6630 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/udns/inet_pton.c | 2 +- libs/udns/inet_pton.h | 2 +- libs/udns/udns_resolver.c | 8 +++++--- libs/win32/udns/libudns.vcproj | 4 ++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libs/udns/inet_pton.c b/libs/udns/inet_pton.c index 902cebae99..654357adb0 100644 --- a/libs/udns/inet_pton.c +++ b/libs/udns/inet_pton.c @@ -69,7 +69,7 @@ static int inet_pton6(const char *src, unsigned char *dst); * 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: diff --git a/libs/udns/inet_pton.h b/libs/udns/inet_pton.h index 19297cd4bf..ec4558fa67 100644 --- a/libs/udns/inet_pton.h +++ b/libs/udns/inet_pton.h @@ -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 */ diff --git a/libs/udns/udns_resolver.c b/libs/udns/udns_resolver.c index 5468a3e76f..3c6435ec0f 100644 --- a/libs/udns/udns_resolver.c +++ b/libs/udns/udns_resolver.c @@ -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 /* includes */ # include /* needed for struct in6_addr */ @@ -282,12 +284,12 @@ static int dns_add_serv_internal(struct dns_ctx *ctx, const char *serv) { #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; diff --git a/libs/win32/udns/libudns.vcproj b/libs/win32/udns/libudns.vcproj index 1fb3346a18..bba5af2ec0 100644 --- a/libs/win32/udns/libudns.vcproj +++ b/libs/win32/udns/libudns.vcproj @@ -209,6 +209,10 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + +