aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-09 08:22:15 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-09 08:22:15 +0000
commit1c3ad80905ad357cf1ec8b35143d009eb0a3e175 (patch)
tree377016561804cdc043ee04edfc13ce384ff49d72 /include
parent9bd61aa747cedeb161b46ca536312d8e569bfbf5 (diff)
Add new file utils.c, Move ast_gethostbyname to utils.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2931 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/lock.h6
-rwxr-xr-xinclude/asterisk/utils.h9
2 files changed, 9 insertions, 6 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 035237914..72743c04f 100755
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -179,11 +179,5 @@ static inline int ast_mutex_init(ast_mutex_t *t)
#endif /* DEBUG_THREADS */
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__
-struct ast_hostent {
- struct hostent hp;
- char buf[1024];
-};
-
-extern struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp);
#endif
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 18863e880..686f4cb1e 100755
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -12,9 +12,18 @@
#ifndef _ASTERISK_UTIL_H
#define _ASTERISK_UTIL_H
+#include <netdb.h>
+
static inline int ast_strlen_zero(const char *s)
{
return (*s == '\0');
}
+struct ast_hostent {
+ struct hostent hp;
+ char buf[1024];
+};
+
+extern struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp);
+
#endif