Skip to content
Snippets Groups Projects
Commit 19e2091f authored by rswindell's avatar rswindell
Browse files

Use the function pthread_mutex_initializer_np() in place of the macro

(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) - when we defined _GNU_SOURCE,
assigning that macro value to list->mutex triggers a GCC compiler error.
parent fc5d80bf
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ link_list_t* DLLCALL listInit(link_list_t* list, long flags)
#if defined(LINK_LIST_THREADSAFE)
if(list->flags&LINK_LIST_MUTEX) {
list->mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
list->mutex = pthread_mutex_initializer_np(/* recursive: */TRUE);
}
if(list->flags&LINK_LIST_SEMAPHORE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment