summaryrefslogtreecommitdiff
path: root/include/asterisk/utils.h
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-08-08 17:15:02 +0000
committerMark Spencer <markster@digium.com>2004-08-08 17:15:02 +0000
commit7acee329e1e2f75c286d5f5140d2d05f1dbf4bd5 (patch)
treee2443cc3c4c3b09b706e611a61f475c509778c57 /include/asterisk/utils.h
parent916566ac11f619843d36f76e386f74779e9e755d (diff)
Merge BSD stack size work (bug #2067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/utils.h')
-rwxr-xr-xinclude/asterisk/utils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 9a3b57329..93f99432a 100755
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -12,7 +12,9 @@
#ifndef _ASTERISK_UTIL_H
#define _ASTERISK_UTIL_H
+#include <netinet/in.h>
#include <netdb.h>
+#include <pthread.h>
static inline int ast_strlen_zero(const char *s)
{
@@ -37,4 +39,14 @@ extern int ast_utils_init(void);
#endif
#define inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__
+#ifdef LINUX
+#define ast_pthread_create pthread_create
+#else
+/* Linux threads have a default 2MB stack size. */
+#ifndef PTHREAD_ATTR_STACKSIZE
+#define PTHREAD_ATTR_STACKSIZE 2097152
+#endif /* PTHREAD_ATTR_STACKSIZE */
+extern int ast_pthread_create(pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *data);
+#endif /* LINUX */
+
#endif