From 73acee7146851b2f495a63dd526b49a9a52f4b61 Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthm@freeswitch.org>
Date: Wed, 12 Feb 2014 03:31:21 +0500
Subject: [PATCH] use portable switch_inet_ntop

---
 src/mod/applications/mod_commands/mod_commands.c | 2 +-
 src/mod/endpoints/mod_sofia/mod_sofia.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c
index cb8b3a3cfc..a637cf98e9 100644
--- a/src/mod/applications/mod_commands/mod_commands.c
+++ b/src/mod/applications/mod_commands/mod_commands.c
@@ -530,7 +530,7 @@ SWITCH_STANDARD_API(gethost_api_function)
 
 		if (he) {
 			memcpy(&sa.sin_addr, he->h_addr, sizeof(struct in_addr));
-			ip = inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
+			ip = switch_inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
 			stream->write_function(stream, "%s", ip);
 			return SWITCH_STATUS_SUCCESS;
 		}
diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c
index a74d7c06ea..e230397b72 100644
--- a/src/mod/endpoints/mod_sofia/mod_sofia.c
+++ b/src/mod/endpoints/mod_sofia/mod_sofia.c
@@ -5094,7 +5094,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
 
 				if (he) {
 					memcpy(&sa.sin_addr, he->h_addr, sizeof(struct in_addr));
-					ip = inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
+					ip = switch_inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
 					tmp = switch_string_replace(dest, host, ip);
 
 					switch_channel_set_variable_printf(nchannel, "sip_route_uri", "sip:%s", tmp);