gethostbyname isn't reentrant, who knew...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-04-22 00:20:34 +00:00
parent ca493a14e1
commit d3f9887589
12 changed files with 71 additions and 35 deletions

View File

@@ -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