Merged revisions 77869 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77869 | file | 2007-08-01 14:56:59 -0300 (Wed, 01 Aug 2007) | 2 lines

Add some fixes for building on Solaris.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-08-01 18:01:33 +00:00
parent 28fec17d59
commit d9aee5e353
5 changed files with 20 additions and 14 deletions

View File

@@ -62,6 +62,12 @@ struct ast_threadstorage {
int (*custom_init)(void *); /*!< Custom initialization function specific to the object */
};
#ifdef SOLARIS
#define THREADSTORAGE_ONCE_INIT {PTHREAD_ONCE_INIT}
#else
#define THREADSTORAGE_ONCE_INIT PTHREAD_ONCE_INIT
#endif
#if defined(DEBUG_THREADLOCALS)
void __ast_threadstorage_object_add(void *key, size_t len, const char *file, const char *function, unsigned int line);
void __ast_threadstorage_object_remove(void *key);
@@ -103,7 +109,7 @@ void __ast_threadstorage_object_replace(void *key_old, void *key_new, size_t len
#define AST_THREADSTORAGE_CUSTOM(name, c_init, c_cleanup) \
static void __init_##name(void); \
static struct ast_threadstorage name = { \
.once = PTHREAD_ONCE_INIT, \
.once = THREADSTORAGE_ONCE_INIT, \
.key_init = __init_##name, \
.custom_init = c_init, \
}; \
@@ -115,7 +121,7 @@ static void __init_##name(void) \
#define AST_THREADSTORAGE_CUSTOM(name, c_init, c_cleanup) \
static void __init_##name(void); \
static struct ast_threadstorage name = { \
.once = PTHREAD_ONCE_INIT, \
.once = THREADSTORAGE_ONCE_INIT, \
.key_init = __init_##name, \
.custom_init = c_init, \
}; \