[asterisk-commits] russell: trunk r78138 - /trunk/include/asterisk/linkedlists.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Aug 4 22:14:24 CDT 2007


Author: russell
Date: Sat Aug  4 22:14:24 2007
New Revision: 78138

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78138
Log:
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.

Modified:
    trunk/include/asterisk/linkedlists.h

Modified: trunk/include/asterisk/linkedlists.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/linkedlists.h?view=diff&rev=78138&r1=78137&r2=78138
==============================================================================
--- trunk/include/asterisk/linkedlists.h (original)
+++ trunk/include/asterisk/linkedlists.h Sat Aug  4 22:14:24 2007
@@ -248,11 +248,11 @@
 	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 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);                                 \
 }                                                                       \




More information about the asterisk-commits mailing list