Skip to content
Permalink
Browse files

SDL-1.2: Fixed recursive mutexes on Linux (thanks, Ozkan!).

  • Loading branch information
icculus committed Mar 24, 2015
1 parent 57f4481 commit 33fad0e636d7b43a9d37595ce045318c67457e7a
Showing with 7 additions and 2 deletions.
  1. +4 −2 configure.in
  2. +3 −0 src/thread/pthread/SDL_sysmutex.c
@@ -2022,7 +2022,8 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
AC_MSG_CHECKING(for recursive mutexes)
has_recursive_mutexes=no
if test x$has_recursive_mutexes = xno; then
AC_TRY_COMPILE([
AC_TRY_LINK([
#define _GNU_SOURCE 1
#include <pthread.h>
],[
pthread_mutexattr_t attr;
@@ -2033,7 +2034,8 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
])
fi
if test x$has_recursive_mutexes = xno; then
AC_TRY_COMPILE([
AC_TRY_LINK([
#define _GNU_SOURCE 1
#include <pthread.h>
],[
pthread_mutexattr_t attr;
@@ -21,6 +21,9 @@
*/
#include "SDL_config.h"

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <pthread.h>

#include "SDL_thread.h"

0 comments on commit 33fad0e

Please sign in to comment.