From 7663d4908eebee680adf005b6aee86faefc47359 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 2 Jun 2013 01:12:29 -0700 Subject: [PATCH] Fixed bug 1881 - SDL will not compile with "SDL_THREADS" disabled. MakoEnergy02 I am attempting to compile SDL on WindowsXP 32-bit, using MinGW. The problem I am having is when I attempt to compile, when it gets to "SDL_systhread.c" it errors: C:\Repos\Mezzanine\Mezzanine\libincludes\common\sdlsrc\SDL\src\thread\generic\SDL_systhread.c|29|error: conflicting types for 'SDL_SYS_CreateThread' C:\Repos\Mezzanine\Mezzanine\libincludes\common\sdlsrc\SDL\src\thread\generic\..\SDL_systhread.h|35|note: previous declaration of 'SDL_SYS_CreateThread' was here I do have SDL_THREADS disabled in my cmake configuration as I do not want or need SDL making threads for me, I have another thread provider. It seems the generic "dummy" implementation does not account for the two extra parameters needed for the "SDL_SYS_CreateThread" method when "SDL_PASSED_BEGINTHREAD_ENDTHREAD" is defined. --- src/thread/generic/SDL_systhread.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/thread/generic/SDL_systhread.c b/src/thread/generic/SDL_systhread.c index deebc64fb..139f8ac03 100644 --- a/src/thread/generic/SDL_systhread.c +++ b/src/thread/generic/SDL_systhread.c @@ -25,8 +25,15 @@ #include "SDL_thread.h" #include "../SDL_systhread.h" +#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD +int +SDL_SYS_CreateThread(SDL_Thread * thread, void *args, + pfnSDL_CurrentBeginThread pfnBeginThread, + pfnSDL_CurrentEndThread pfnEndThread) +#else int SDL_SYS_CreateThread(SDL_Thread * thread, void *args) +#endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */ { return SDL_SetError("Threads are not supported on this platform"); }