]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
We should probably declare the lock... and not just the constructor/deconstructor.
authorJoshua Colp <jcolp@digium.com>
Sat, 23 Dec 2006 19:55:38 +0000 (19:55 +0000)
committerJoshua Colp <jcolp@digium.com>
Sat, 23 Dec 2006 19:55:38 +0000 (19:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48928 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/lock.h

index c44929fa51102e77478a0f7417300fedf1f1e924..ca6663a9cda27e9222b52e2a691888031e869df1 100644 (file)
@@ -666,6 +666,7 @@ static inline int ast_rwlock_trywrlock(ast_rwlock_t *prwlock)
 
 #ifndef HAVE_PTHREAD_RWLOCK_INITIALIZER
 #define __AST_RWLOCK_DEFINE(scope, rwlock) \
+        scope ast_rwlock_t rwlock; \
 static void  __attribute__ ((constructor)) init_##rwlock(void) \
 { \
         ast_rwlock_init(&rwlock); \