aboutsummaryrefslogtreecommitdiffstats
path: root/utils.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-29 12:56:46 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-29 12:56:46 +0000
commited56b47de7f4a39c426fef692f424d82e565714a (patch)
treed715877541188789ffca02a85def77a7a01cbea9 /utils.c
parenteb2476308635e0c068a4ab2f27e9adbbf935c2ef (diff)
Create reentrant ast_inet_ntoa and replace all inet_ntoa's with ast_inet_ntoa's (but #1944)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3345 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils.c')
-rwxr-xr-xutils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 6052c7855..45be32230 100755
--- a/utils.c
+++ b/utils.c
@@ -12,6 +12,9 @@
#include <ctype.h>
#include <string.h>
#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
#include <asterisk/lock.h>
#include <asterisk/utils.h>
@@ -325,6 +328,10 @@ static void base64_init(void)
#endif
}
+const char *ast_inet_ntoa(char *buf, int bufsiz, struct in_addr ia)
+{
+ return inet_ntop(AF_INET, &ia, buf, bufsiz);
+}
int ast_utils_init(void)
{