Skip to content

Commit

Permalink
thread: Fix build, if SDL is built without an external C runtime.
Browse files Browse the repository at this point in the history
Fixes #9858.
  • Loading branch information
icculus committed May 23, 2024
1 parent 25024ea commit 48ebc82
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/SDL_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@
#error SDL_RENDER enabled without any backend drivers.
#endif

#if !defined(HAVE_LIBC)
// If not using _any_ C runtime, these have to be defined before SDL_thread.h
// gets included, so SDL_CreateThread calls won't try to reference the
// (unavailable and unneeded) _beginthreadex/_endthreadex functions.
#define SDL_BeginThreadFunction NULL
#define SDL_EndThreadFunction NULL
#endif

#include <SDL3/SDL.h>
#include <SDL3/SDL_intrin.h>

Expand Down

0 comments on commit 48ebc82

Please sign in to comment.