mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-28 07:01:07 +00:00
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:
@@ -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, \
|
||||
}; \
|
||||
|
||||
Reference in New Issue
Block a user