cyrus-sasl: moved to github
[packages.git] / libs / libdirectfb / patches / 002-use-volatile-keyword.patch
1 diff -burN DirectFB-1.4.2.orig/lib/direct/interface.c DirectFB-1.4.2/lib/direct/interface.c
2 --- DirectFB-1.4.2.orig/lib/direct/interface.c  2013-01-29 13:57:25.000000000 +0100
3 +++ DirectFB-1.4.2/lib/direct/interface.c       2013-01-29 13:59:37.000000000 +0100
4 @@ -74,7 +74,7 @@
5  } DirectInterfaceImplementation;
6  
7  static pthread_mutex_t  implementations_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
8 -static DirectLink      *implementations       = NULL;
9 +static DirectLink      * volatile implementations       = NULL;
10  
11  /**************************************************************************************************/
12  
13 @@ -96,7 +96,7 @@
14       D_DEBUG_AT( Direct_Interface, "  -> %s | %s\n", impl->type, impl->implementation );
15  
16       pthread_mutex_lock( &implementations_mutex );
17 -     direct_list_prepend( &implementations, &impl->link );
18 +     direct_list_prepend( (DirectLink**)&implementations, &impl->link );
19       pthread_mutex_unlock( &implementations_mutex );
20  }
21  
22 @@ -111,7 +111,7 @@
23            D_MAGIC_ASSERT( impl, DirectInterfaceImplementation );
24  
25            if (impl->funcs == funcs) {
26 -               direct_list_remove( &implementations, &impl->link );
27 +               direct_list_remove( (DirectLink**)&implementations, &impl->link );
28  
29                 break;
30            }