Fix building res_crypto on systems that init locks with constructors.

The problem was that res_crypto now has a RWLIST named "keys".  The macro
for defining this list defines a function used as a constructor for the list
called "init_keys".  However, there was another function called init_keys in
this module for a CLI command.  The fix is just to prepend the generated
functions with underscores.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Russell Bryant 18 years ago
parent 224dd669b4
commit 1765f903c4

@ -248,11 +248,11 @@ struct name { \
struct type *last; \
ast_mutex_t lock; \
} name; \
static void __attribute__ ((constructor)) init_##name(void) \
static void __attribute__ ((constructor)) __init_##name(void) \
{ \
AST_LIST_HEAD_INIT(&name); \
} \
static void __attribute__ ((destructor)) fini_##name(void) \
static void __attribute__ ((destructor)) __fini_##name(void) \
{ \
AST_LIST_HEAD_DESTROY(&name); \
} \
@ -290,11 +290,11 @@ struct name { \
struct type *last; \
ast_rwlock_t lock; \
} name; \
static void __attribute__ ((constructor)) init_##name(void) \
static void __attribute__ ((constructor)) __init_##name(void) \
{ \
AST_RWLIST_HEAD_INIT(&name); \
} \
static void __attribute__ ((destructor)) fini_##name(void) \
static void __attribute__ ((destructor)) __fini_##name(void) \
{ \
AST_RWLIST_HEAD_DESTROY(&name); \
} \

Loading…
Cancel
Save