components/gcc49/patches/016-022-gthr-posix.h.patch
changeset 6923 338aea22bf22
parent 6922 499ba999c1ee
child 6924 e8aaad6b5075
equal deleted inserted replaced
6922:499ba999c1ee 6923:338aea22bf22
     1 # Stefan Teleman <[email protected]>
       
     2 # C++ wants const-correctness. NULL isn't const-correct.
       
     3 # Internal patch. Not submitted upstream yet.
       
     4 --- libgcc/gthr-posix.h	2014-01-02 14:25:22.000000000 -0800
       
     5 +++ libgcc/gthr-posix.h	2015-08-05 08:30:34.294887934 -0700
       
     6 @@ -659,7 +659,8 @@
       
     7  __gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
       
     8  		  void *__args)
       
     9  {
       
    10 -  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
       
    11 +  const pthread_attr_t *__pta = 0;
       
    12 +  return __gthrw_(pthread_create) (__threadid, __pta, __func, __args);
       
    13  }
       
    14  
       
    15  static inline int
       
    16 @@ -729,7 +730,10 @@
       
    17  __gthread_mutex_init_function (__gthread_mutex_t *__mutex)
       
    18  {
       
    19    if (__gthread_active_p ())
       
    20 -    __gthrw_(pthread_mutex_init) (__mutex, NULL);
       
    21 +  {
       
    22 +    const pthread_mutexattr_t *__pma = 0;
       
    23 +    __gthrw_(pthread_mutex_init) (__mutex, __pma);
       
    24 +  }
       
    25  }
       
    26  
       
    27  static inline int
       
    28 @@ -842,7 +846,10 @@
       
    29  __gthread_cond_init_function (__gthread_cond_t *__cond)
       
    30  {
       
    31    if (__gthread_active_p ())
       
    32 -    __gthrw_(pthread_cond_init) (__cond, NULL);
       
    33 +  {
       
    34 +    const pthread_condattr_t *__pca = 0;
       
    35 +    __gthrw_(pthread_cond_init) (__cond, __pca);
       
    36 +  }
       
    37  }
       
    38  #endif
       
    39