diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-22 00:20:34 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-22 00:20:34 +0000 |
commit | 8f30aa29846673327fd04114d653311963782068 (patch) | |
tree | dbaf6442bfe038629c0c97eef75077d71ebd2ec7 /include/asterisk | |
parent | a4f2d9262e216fe8e8607f8d8d07c08ec87c0149 (diff) |
gethostbyname isn't reentrant, who knew...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2734 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rwxr-xr-x | include/asterisk/lock.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index 9542dbe06..035237914 100755 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -15,6 +15,7 @@ #define _ASTERISK_LOCK_H #include <pthread.h> +#include <netdb.h> #define AST_PTHREADT_NULL (pthread_t) -1 #define AST_PTHREADT_STOP (pthread_t) -2 @@ -177,5 +178,12 @@ 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 |