From 374997f2c1771c958384b49af500cd500f5af721 Mon Sep 17 00:00:00 2001 From: Mathieu Rene <mrene@avgs.ca> Date: Wed, 10 Jun 2009 00:04:29 +0000 Subject: [PATCH] Export swtich_inet_ntop so modules can use it git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13738 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_utils.h | 6 ++++++ src/switch_utils.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index 22626bfa0e..6e6d7565fe 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -577,6 +577,12 @@ int switch_inet_pton(int af, const char *src, void *dst); #endif #endif +#ifndef _MSC_VER +#define switch_inet_ntop inet_ntop +#else + +SWITCH_DECLARE(const char *) switch_inet_ntop(int af, void const *src, char *dst, size_t size); + SWITCH_END_EXTERN_C #endif /* For Emacs: diff --git a/src/switch_utils.c b/src/switch_utils.c index 31b182ebde..cd2a6159a1 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -1080,9 +1080,6 @@ SWITCH_DECLARE(const char *) switch_priority_name(switch_priority_t priority) static char RFC2833_CHARS[] = "0123456789*#ABCDF"; -#ifndef _MSC_VER -#define switch_inet_ntop inet_ntop -#else /* Copyright (c) 1996 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -1125,7 +1122,7 @@ static const char *switch_inet_ntop6(const unsigned char *src, char *dst, size_t * author: * Paul Vixie, 1996. */ -const char *switch_inet_ntop(int af, void const *src, char *dst, size_t size) +SWITCH_DECLARE(const char *) switch_inet_ntop(int af, void const *src, char *dst, size_t size) { switch (af) {