[Asterisk-cvs] asterisk/include/asterisk lock.h,1.15,1.16

markster at lists.digium.com markster at lists.digium.com
Wed Apr 21 20:15:53 CDT 2004


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv19986/include/asterisk

Modified Files:
	lock.h 
Log Message:
gethostbyname isn't reentrant, who knew...


Index: lock.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/lock.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- lock.h	19 Apr 2004 21:52:39 -0000	1.15
+++ lock.h	22 Apr 2004 00:20:34 -0000	1.16
@@ -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 @@
 
 #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




More information about the svn-commits mailing list