From ab5c49f7ecbe4f896d943b5b3592c8be84deb6c1 Mon Sep 17 00:00:00 2001 From: Thomas Gellekum Date: Thu, 20 Apr 2000 09:24:28 +0000 Subject: Use our libc_r instead of linuxthreads. Reviewed by: Maxim Sobolev --- devel/sdl10/files/patch-af | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 devel/sdl10/files/patch-af (limited to 'devel/sdl10/files/patch-af') diff --git a/devel/sdl10/files/patch-af b/devel/sdl10/files/patch-af new file mode 100644 index 000000000000..28c3cfef4b85 --- /dev/null +++ b/devel/sdl10/files/patch-af @@ -0,0 +1,45 @@ +--- src/thread/linux/SDL_mutex.c.orig Tue Nov 23 20:01:41 1999 ++++ src/thread/linux/SDL_mutex.c Mon Apr 17 21:08:57 2000 +@@ -42,6 +42,7 @@ + + #ifdef SDL_USE_PTHREADS + ++#include + #include + #include + #include +@@ -60,14 +61,14 @@ + SDL_mutex *mutex; + + /* Allocate the structure */ +- mutex = (SDL_mutex *)malloc(sizeof(*mutex)); ++ mutex = (SDL_mutex *)malloc(sizeof(mutex)); + if ( mutex == NULL ) { + SDL_OutOfMemory(); + return(NULL); + } + + if ( pthread_mutex_init(&mutex->id, NULL) != 0 ) { +- SDL_SetError("Couldn't create mutex"); ++ SDL_SetError("Couldn't create mutex; reason: %d", errno); + free(mutex); + return(NULL); + } +@@ -82,7 +83,7 @@ + return(-1); + } + if ( pthread_mutex_lock(&mutex->id) != 0 ) { +- SDL_SetError("Couldn't lock mutex"); ++ SDL_SetError("Couldn't lock mutex; reason: %d", errno); + return(-1); + } + return(0); +@@ -96,7 +97,7 @@ + return(-1); + } + if ( pthread_mutex_unlock(&mutex->id) != 0 ) { +- SDL_SetError("Couldn't unlock mutex"); ++ SDL_SetError("Couldn't unlock mutex; reason: %d", errno); + return(-1); + } + return(0); -- cgit v1.2.3