]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
AST_RWLOCK_INIT_VALUE is always defined. What we really wanted to ask is
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 22 Jan 2009 00:43:31 +0000 (00:43 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 22 Jan 2009 00:43:31 +0000 (00:43 +0000)
whether autoconf detected a static initializer value.  This fixes rwlocks
on all such platforms (mainly, Mac OS X).
(closes issue #13767)
 Reported by: jcovert
 Patches:
       20090121__bug13767.diff.txt uploaded by Corydon76 (license 14)
 Tested by: jcovert, Corydon76

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@169943 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/linkedlists.h

index e7511fd8a2b601613973dc5202ef484cb42346c8..bd7f6a9b1a69f9960d9c67a7794bf189bbe468a9 100644 (file)
@@ -277,7 +277,7 @@ struct name {                                                               \
   This would define \c struct \c entry_list, intended to hold a list of
   type \c struct \c entry.
 */
-#ifndef AST_RWLOCK_INIT_VALUE
+#ifndef HAVE_PTHREAD_RWLOCK_INITIALIZER
 #define AST_RWLIST_HEAD_STATIC(name, type)                              \
 struct name {                                                           \
         struct type *first;                                             \